Skip to content
Snippets Groups Projects
user avatar
Juho Mäkinen authored
The allocate() method allows to use an IPAddress::IPv4 or ::IPv6 object
to allocate individual host addresses so that the IPAddress object
tracks the state of which address was previously allocated.

Example:

  ip = IPAddress("10.0.0.0/24")
  ip.allocate
    #=> "10.0.0.1/24"
  ip.allocate
    #=> "10.0.0.2/24"

There is support for both IPv4 and IPv6 with full test coverage.
eb017ad7
History
Name Last commit Last update