Class IPAddress::Prefix
In: lib/ipaddress/prefix.rb
Parent: Object

NAME

IPAddress::Prefix

SYNOPSIS

Parent class for Prefix32 and Prefix128

DESCRIPTION

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

IPAddress::Prefix shouldn‘t be accesses directly, unless for particular needs.

Methods

+   -   <=>   inspect   new   to_i   to_s  

Included Modules

Comparable

Attributes

prefix  [R] 

Public Class methods

Creates a new general prefix

Public Instance methods

Sums two prefixes or a prefix to a number, returns a Fixnum

Returns the difference between two prefixes, or a prefix and a number, as a Fixnum

Compare the prefix

inspect()

Alias for to_s

Returns the prefix

Returns a string with the prefix

[Validate]