struct

Ipconv::RangeGenerator

Inherits Enumerable < Struct < Value < Object

Generator that enumerates IP addresses in a CIDR range with pagination support.

Constructors

new(cidr : CIDR, limit : UInt64 | Nil = nil, offset : UInt64 = 0_u64)

Creates a new RangeGenerator for the given cidr with optional limit and offset.

Source

Instance methods

cidr

Returns the underlying CIDR block.

Source
each

Iterates over each Address in the CIDR range, applying offset and limit.

Source
large?

Returns true if the CIDR range has more than 65536 addresses (larger than IPv4 /16).

Source
limit

Returns the optional limit on number of addresses to emit.

Source
offset

Returns the number of initial addresses to skip.

Source
size

Returns the total size of the CIDR range.

Source