Class: Packcr::Parser::ThunkLeaf

Inherits:
Object
  • Object
show all
Defined in:
lib/packcr/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action, capt0 = Capture.new, value_refs = {}, capts = {}) ⇒ ThunkLeaf

Returns a new instance of ThunkLeaf.



4831
4832
4833
4834
4835
4836
# File 'lib/packcr/parser.rb', line 4831

def initialize(action, capt0 = Capture.new, value_refs = {}, capts = {})
  @value_refs = value_refs
  @capts = capts
  @capt0 = capt0
  @action = action
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



4829
4830
4831
# File 'lib/packcr/parser.rb', line 4829

def action
  @action
end

#capt0Object

Returns the value of attribute capt0.



4829
4830
4831
# File 'lib/packcr/parser.rb', line 4829

def capt0
  @capt0
end

#captsObject

Returns the value of attribute capts.



4829
4830
4831
# File 'lib/packcr/parser.rb', line 4829

def capts
  @capts
end

#value_refsObject

Returns the value of attribute value_refs.



4829
4830
4831
# File 'lib/packcr/parser.rb', line 4829

def value_refs
  @value_refs
end

Instance Method Details

#do_action(ctx, values, index) ⇒ Object



4838
4839
4840
# File 'lib/packcr/parser.rb', line 4838

def do_action(ctx, values, index)
  ctx.public_send(action, self, values, index)
end