IP::Block::IPv4
Inherits IP::Block < Comparable < Struct < Value < Object
Constructors
Constructs a new IP::Block::IPv4 from an address and the block size, [0-32].
Raises: MalformedError when the input is malformed.
new(string : String) : self
Constructs a new IP::Block::IPv4 by interpreting the contents of a given String.
Expects a definition in CIDR notation similar to [0-255].[0-255].[0-255].[0-255]/[0-32].
Raises: MalformedError when the input is malformed.
Class methods
Constructs a new IP::Block::IPv4 from an address and the block size, [0-32].
Returns nil when the input is malformed.
new?(string : String) : self | Nil
Constructs a new IP::Block::IPv4 by interpreting the contents of a given String.
Expects a definition in CIDR notation similar to [0-255].[0-255].[0-255].[0-255]/[0-32]
Returns nil when the input is malformed.