lib/ipaddress/ipv6.rb
#
# Allocates a new ip from the current subnet. Optional skip parameter
# can be used to skip addresses.
#
# Will raise StopIteration exception when all addresses have been allocated
#
# Example:
#
#    ip = IPAddress("10.0.0.0/24")
#    ip.allocate
#      #=> "10.0.0.1/24"
#    ip.allocate
#      #=> "10.0.0.2/24"
#    ip.allocate(2)
#      #=> "10.0.0.5/24"
#
#
# Uses an internal @allocator which tracks the state of allocated
# addresses.
#
Allocates a new ip from the current subnet. Optional skip parameter
can be used to skip addresses.

Will raise StopIteration exception when all addresses have been allocated





Uses an internal @allocator which tracks the state of allocated
addresses.
Allocates a new ip from the current subnet . Optional skip parameter can be used to skip addresses . Will raise StopIteration exception when all addresses have been allocated Uses an internal @allocator which tracks the state of allocated addresses .
def allocate(skip=0)
        @allocator += 1 + skip
        next_ip = network_u128+@allocator
        if next_ip > broadcast_u128
            raise StopIteration
        end
        self.class.parse_u128(next_ip, @prefix)
    end
def allocate ( skip = 0 ) @allocator += 1 + skip next_ip = network_u128 + @allocator if next_ip > broadcast_u128 raise StopIteration end self . class . parse_u128 ( next_ip , @prefix ) end
Allocates a new ip from the current subnet.
Allocates a new ip from the current subnet .
skip
<not_specific>