Method: Pio::IPv4Address#to_a

Defined in:
lib/pio/ipv4_address.rb

#to_aArray

Returns an array of decimal numbers converted from IPv4 address.

Returns:

  • (Array)

    an array of decimal numbers converted from IPv4 address.

[View source]

61
62
63
64
65
# File 'lib/pio/ipv4_address.rb', line 61

def to_a
  to_s.split('.').map do | each |
    each.to_i
  end
end