Class: Packcr::Tokenizer::ThunkLeaf

Inherits:
Thunk
  • Object
show all
Defined in:
lib/packcr/tokenizer.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.



2867
2868
2869
2870
2871
2872
# File 'lib/packcr/tokenizer.rb', line 2867

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.



2865
2866
2867
# File 'lib/packcr/tokenizer.rb', line 2865

def action
  @action
end

#capt0Object

Returns the value of attribute capt0.



2865
2866
2867
# File 'lib/packcr/tokenizer.rb', line 2865

def capt0
  @capt0
end

#captsObject

Returns the value of attribute capts.



2865
2866
2867
# File 'lib/packcr/tokenizer.rb', line 2865

def capts
  @capts
end

#value_refsObject

Returns the value of attribute value_refs.



2865
2866
2867
# File 'lib/packcr/tokenizer.rb', line 2865

def value_refs
  @value_refs
end

Instance Method Details

#do_action(ctx, values, index) ⇒ Object



2874
2875
2876
# File 'lib/packcr/tokenizer.rb', line 2874

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