Class: PacketGen::Header::IP::ArrayOfAddr
- Inherits:
-
Types::Array
- Object
- Types::Array
- PacketGen::Header::IP::ArrayOfAddr
- Defined in:
- lib/packetgen/header/ip/option.rb
Overview
Class to handle series of IP addresses
Constant Summary
Constants inherited from Types::Array
Instance Method Summary collapse
-
#push(addr) ⇒ self
Push a IP address to the array.
Methods inherited from Types::Array
#<<, #==, #[], #clear, #clear!, #delete, #delete_at, #each, #empty?, #first, #initialize, #initialize_copy, #last, #read, set_of, set_of_klass, #size, #sz, #to_a, #to_human, #to_s
Methods included from Types::LengthFrom
#initialize_length_from, #read_with_length_from
Constructor Details
This class inherits a constructor from PacketGen::Types::Array
Instance Method Details
#push(addr) ⇒ self
Push a IP address to the array
20 21 22 23 |
# File 'lib/packetgen/header/ip/option.rb', line 20 def push(addr) addr = addr.is_a?(Addr) ? addr : Addr.new.from_human(addr) super(addr) end |