abstract struct IPAddress::Prefix
- IPAddress::Prefix
- Struct
- Value
- Object
Overview
IPAddress::Prefix
is the parent class for IPAddress::Prefix32
and IPAddress::Prefix128
, defining some methods in common for
both the subclasses.
Included Modules
- Comparable(Int)
- Comparable(IPAddress::Prefix)
Direct Known Subclasses
Defined in:
ipaddress/prefix.crConstructors
-
.new(prefix : Int)
Creates a new general prefix.
Instance Method Summary
-
#+(other : Prefix) : Int
Returns the sums of two prefixes.
-
#+(other : Int) : Int
Returns the sum of
#prefix
and an other. -
#-(other : Prefix) : Int
Returns the difference between two prefixes.
-
#-(other : Int) : Int
Returns the difference between
#prefix
and an other. -
#<=>(other : Prefix)
Compares the prefixes.
-
#<=>(other : Int)
Compares the prefixes.
-
#hash(hasher)
Returns the
#prefix
. -
#pred : Prefix
Returns the predecessor to the
#prefix
. -
#prefix : Int32
Returns IP prefix value.
-
#succ : Prefix
Returns the successor to the
#prefix
. -
#to_i : Int32
Returns the
#prefix
. -
#to_s(io : IO)
Appends a string representation of the prefix to the given
IO
object.