Class: PacketGen::Header::IKE::SAProposals

Inherits:
Types::Array show all
Defined in:
lib/packetgen/header/ike/sa.rb

Overview

Set of SAProposal

Author:

  • Sylvain Daubert

Since:

  • 2.0.0

Constant Summary collapse

HUMAN_SEPARATOR =

Separator used between proposals in Types::Array#to_human

Since:

  • 2.0.0

'; '

Instance Method Summary collapse

Methods inherited from Types::Array

#<<, #==, #[], #clear, #clear!, #delete, #delete_at, #each, #empty?, #first, #force_binary, #initialize, #initialize_copy, #last, #read, set_of, #size, #sz, #to_a, #to_human, #to_s

Constructor Details

This class inherits a constructor from PacketGen::Types::Array

Instance Method Details

#push(prop) ⇒ Object

Same as Types::Array#push but update previous PacketGen::Header::IKE::SAProposal#last attribute

See Also:

Since:

  • 2.0.0



492
493
494
495
496
497
# File 'lib/packetgen/header/ike/sa.rb', line 492

def push(prop)
  super
  self[-2].last = 2 if size > 1
  self[-1].last = 0
  self
end