new(addr = '::', family = Socket::AF_UNSPEC)
Class Public methods
Creates a new ipaddr object either from a human readable IP address
representation in string, or from a packed in_addr value followed by an
address family.
In the former case, the following are the valid formats that will be
recognized: âaddressâ, âaddress/prefixlenâ and âaddress/maskâ, where IPv6
address may be enclosed in square brackets (`[' and `]'). If a
prefixlen or a mask is specified, it returns a masked IP