Skip to content
Snippets Groups Projects
  • Juho Mäkinen's avatar
    eb017ad7
    Add allocate() method · eb017ad7
    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
    Add allocate() method
    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.