hwaddr 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/hwaddr.gemspec +1 -1
  2. data/lib/hwaddr.rb +6 -0
  3. metadata +1 -1
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new {|s|
2
2
  s.name = 'hwaddr'
3
- s.version = '0.0.2'
3
+ s.version = '0.0.3'
4
4
  s.author = 'meh.'
5
5
  s.email = 'meh@paranoici.org'
6
6
  s.homepage = 'http://github.com/meh/ruby-hwaddr'
@@ -40,6 +40,8 @@ class HWAddr
40
40
  unless HWAddr.valid?(@string)
41
41
  raise ArgumentError, "#{value} isn't an usable MAC address"
42
42
  end
43
+
44
+ @string.downcase!
43
45
  end
44
46
 
45
47
  def =~ (other)
@@ -54,6 +56,10 @@ class HWAddr
54
56
  to_s.length == 8
55
57
  end
56
58
 
59
+ def broadcast?
60
+ to_s == 'ff:ff:ff:ff:ff:ff'
61
+ end
62
+
57
63
  def productor
58
64
  Database[to_s]
59
65
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hwaddr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: