Method: IPAddress::IPv4#u32
- Defined in:
- lib/ipaddress/ipv4.rb
#u32 ⇒ Object Also known as: to_i, to_u32
Returns the address portion in unsigned 32 bits integer format.
This method is identical to the C function inet_pton to create a 32 bits address family structure.
ip = IPAddress("10.0.0.0/8")
ip.to_i
#=> 167772160
229 230 231 |
# File 'lib/ipaddress/ipv4.rb', line 229 def u32 @u32 end |