class Net::IPNet
- Net::IPNet
- Reference
- Object
Overview
An IPNet represents an IP network
Defined in:
net/ip.crConstructors
Instance Method Summary
-
#contains?(ip : IP)
reports whether the network includes ip
- #ip : IP
-
#mask : IPMask
network number
-
#network
network returns the address's network name, "ip+net"
-
#to_s
to_s returns the CIDR notation of n like "192.0.2.1/24" or "2001:db8::/48" as defined in RFC 4632 and RFC 4291.
Constructor Detail
Instance Method Detail
def to_s
#
to_s returns the CIDR notation of n like "192.0.2.1/24" or "2001:db8::/48" as defined in RFC 4632 and RFC 4291. If the mask is not in the canonical form, it returns the string which consists of an IP address, followed by a slash character and a mask expressed as hexadecimal form with no punctuation like "198.51.100.1/c000ff00".