lib/iz/mac.rb in iz-0.0.1 vs lib/iz/mac.rb in iz-0.1.0
- old
+ new
@@ -7,13 +7,14 @@
def initialize(mac)
self.value = mac
end
def valid?
- Iz::Mac.is_mac?(value)
+ !!Iz::Mac.is_mac?(value)
end
def self.is_mac?(value)
+ return false unless value
value.to_s =~ REGEX
end
end
end