Class: Pio::Type::MacAddress
- Inherits:
-
BinData::Primitive
- Object
- BinData::Primitive
- Pio::Type::MacAddress
- Defined in:
- lib/pio/type/mac_address.rb
Overview
MAC address
Instance Method Summary collapse
Instance Method Details
#get ⇒ Object
16 17 18 19 20 |
# File 'lib/pio/type/mac_address.rb', line 16 def get Mac.new(octets.reduce('') do |str, each| str + format('%02x', each) end.hex) end |
#set(value) ⇒ Object
12 13 14 |
# File 'lib/pio/type/mac_address.rb', line 12 def set(value) self.octets = value.to_a end |