Class: BinData::MacAddress
- Inherits:
-
Primitive
- Object
- Primitive
- BinData::MacAddress
- Defined in:
- lib/bindata-contrib/mac_address.rb
Instance Method Summary collapse
Instance Method Details
#get ⇒ Object
8 9 10 |
# File 'lib/bindata-contrib/mac_address.rb', line 8 def get octets.map { |octet| format('%02x', octet) }.join(':') end |
#set(value) ⇒ Object
12 13 14 |
# File 'lib/bindata-contrib/mac_address.rb', line 12 def set(value) self.octets = value.split(':').map(&:hex) end |