Class: PacketGen::Header::Base::ProcBinding Private
- Inherits:
-
Object
- Object
- PacketGen::Header::Base::ProcBinding
- Defined in:
- lib/packetgen/header/base.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class to handle a header association from procs
Instance Method Summary collapse
-
#check?(fields) ⇒ Boolean
private
Check
fields
responds to binding. -
#initialize(procs) ⇒ ProcBinding
constructor
private
A new instance of ProcBinding.
-
#set(fields) ⇒ void
private
Set
fields
field to binding value.
Constructor Details
#initialize(procs) ⇒ ProcBinding
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ProcBinding.
59 60 61 62 |
# File 'lib/packetgen/header/base.rb', line 59 def initialize(procs) @set = procs.shift @check = procs.shift end |
Instance Method Details
#check?(fields) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Check fields
responds to binding
67 68 69 |
# File 'lib/packetgen/header/base.rb', line 67 def check?(fields) @check.call(fields) end |
#set(fields) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Set fields
field to binding value
74 75 76 |
# File 'lib/packetgen/header/base.rb', line 74 def set(fields) @set.call(fields) end |