class Pio::Type::IpAddress
IP address
Public Instance Methods
&(other)
click to toggle source
# File lib/pio/type/ip_address.rb, line 24 def &(other) get.to_i & other end
==(other)
click to toggle source
# File lib/pio/type/ip_address.rb, line 28 def ==(other) get == other end
>>(other)
click to toggle source
# File lib/pio/type/ip_address.rb, line 20 def >>(other) get.to_i >> other end
get()
click to toggle source
# File lib/pio/type/ip_address.rb, line 16 def get IPv4Address.new(octets.map { |each| format('%d', each) }.join('.')) end
inspect()
click to toggle source
# File lib/pio/type/ip_address.rb, line 36 def inspect %("#{get}") end
set(value)
click to toggle source
# File lib/pio/type/ip_address.rb, line 12 def set(value) self.octets = IPv4Address.new(value).to_a end
to_bytes()
click to toggle source
# File lib/pio/type/ip_address.rb, line 32 def to_bytes octets.map(&:to_hex).join(', ') end