IPAddress::Prefix128
Inherits IPAddress::Prefix < Comparable < Comparable < Struct < Value < Object
Constructors
Instance methods
bits
Transforms the prefix into a string of bits representing the netmask.
prefix = IPAddress::Prefix128.new 64
prefix.bits
# => "1111111111111111111111111111111111111111111111111111111111111111"
"0000000000000000000000000000000000000000000000000000000000000000"
host_prefix
Returns the length of the host portion of a netmask.
prefix = IPAddress::Prefix128.new 96
prefix.host_prefix # => 32
to_big_i
Returns unsigned 128 bits decimal number representing
the prefix as BigInt.
prefix = IPAddress::Prefix128.new 64
prefix.to_big_i # => 340282366920938463444927863358058659840