Method: IPAddress::IPv6::Mapped#to_string
- Defined in:
- lib/ipaddress/ipv6.rb
#to_string ⇒ Object
Similar to IPv6#to_string, but prints out the IPv4 address in dotted decimal format
ip6 = IPAddress "::ffff:172.16.10.1/128"
ip6.to_string
#=> "::ffff:172.16.10.1/128"
877 878 879 |
# File 'lib/ipaddress/ipv6.rb', line 877 def to_string "::ffff:#{@ipv4.address}/#@prefix" end |