Class: Pio::Type::IpAddress

Inherits:
BinData::Primitive
  • Object
show all
Defined in:
lib/pio/type/ip_address.rb

Overview

IP address

Instance Method Summary collapse

Instance Method Details

#getObject



16
17
18
# File 'lib/pio/type/ip_address.rb', line 16

def get
  IPv4Address.new octets.map { | each | format('%d', each) }.join('.')
end

#set(value) ⇒ Object



12
13
14
# File 'lib/pio/type/ip_address.rb', line 12

def set(value)
  self.octets = value
end