Ipconv::IPv4
Inherits Comparable < Struct < Value < Object
Constants
SPECIAL_RANGES = [{4278190080_u32, 2130706432_u32, Special::Loopback}, {4278190080_u32, 167772160_u32, Special::Private}, {4293918720_u32, 2886729728_u32, Special::Private}, {4294901760_u32, 3232235520_u32, Special::Private}, {4294901760_u32, 2851995648_u32, Special::LinkLocal}, {4290772992_u32, 1681915904_u32, Special::CarrierGradeNAT}, {4294967040_u32, 3221225984_u32, Special::Documentation}, {4294967040_u32, 3325256704_u32, Special::Documentation}, {4294967040_u32, 3405803776_u32, Special::Documentation}, {4294836224_u32, 3323068416_u32, Special::Benchmarking}, {4294967040_u32, 3221225472_u32, Special::IETFProtocol}, {4026531840_u32, 3758096384_u32, Special::Multicast}, {4026531840_u32, 4026531840_u32, Special::Reserved}]
Constructors
Instance methods
The comparison operator. Returns 0 if the two objects are equal,
a negative number if this object is considered less than other,
a positive number if this object is considered greater than other,
or nil if the two objects are not comparable.
Subclasses define this method to provide class-specific ordering.
The comparison operator is usually used to sort values:
# Sort in a descending way:
[3, 1, 2].sort { |x, y| y <=> x } # => [3, 2, 1]
# Sort in an ascending way:
[3, 1, 2].sort { |x, y| x <=> y } # => [1, 2, 3]
addr
Sourceclassify
Sourceoctets
Sourcespecial
Sourcesucc
Sourceto_binary
Sourceto_dotted
Sourceto_hex
Sourceto_hex_dotted
Sourceto_integer
Sourceto_octal
Source