struct

IPAddress::Prefix

Inherits Comparable < Comparable < Struct < Value < Object

IPAddress::Prefix is the parent class for IPAddress::Prefix32 and IPAddress::Prefix128, defining some methods in common for both the subclasses.

Constructors

new(prefix : Int)

Creates a new general prefix.

Source

Instance methods

+(other : Prefix) : Int

Returns the sums of two prefixes.

Source
+(other : Int) : Int

Returns the sum of #prefix and an other.

Source
-(other : Prefix) : Int

Returns the difference between two prefixes.

Source
-(other : Int) : Int

Returns the difference between #prefix and an other.

Source
<=>(other : Prefix)

Compares the prefixes.

Source
<=>(other : Int)

Compares the prefixes.

Source
hash(hasher)

Returns the #prefix.

Source
pred

Returns the predecessor to the #prefix.

Source
prefix

Returns IP prefix value.

Source
succ

Returns the successor to the #prefix.

Source
to_i

Returns the #prefix.

Source
to_s(io : IO)

Appends a string representation of the prefix to the given IO object.

Source