Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/mac_address.rb
Instance Method Summary collapse
Instance Method Details
#to_mac ⇒ Object
37 38 39 |
# File 'lib/mac_address.rb', line 37 def to_mac MacAddress.new(self).to_s end |
#valid_mac?(options = {}) ⇒ Boolean
41 42 43 44 45 46 47 |
# File 'lib/mac_address.rb', line 41 def valid_mac?( = {}) if [:strict] MacAddress.validate_strict(self) else MacAddress.validate(self) end end |