abstract class Subnet::Prefix

Overview

The base class for Prefix32 and Prefix128 defining some common methods that exist in both.

Included Modules

Direct Known Subclasses

Defined in:

subnet/prefix.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(num) #

Create a new Prefix.


[View source]

Instance Method Detail

def +(other) #

Add this Prefix to another.


[View source]
def -(other) #

Subtract another Prefix from this one.


[View source]
def <=>(other) #

Compare this Prefix to another.


[View source]
def prefix : Int32 #

[View source]
def prefix=(prefix : Int32) #

[View source]
def to_i : Int32 #

Return this Prefix as an integer.


[View source]
def to_s(io) #

Convert the Prefix to a string.


[View source]