Class: Packcr::Parser::ThunkNode
- Inherits:
-
Object
- Object
- Packcr::Parser::ThunkNode
- Defined in:
- lib/packcr/parser.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
Returns the value of attribute index.
-
#thunks ⇒ Object
Returns the value of attribute thunks.
-
#values ⇒ Object
Returns the value of attribute values.
Instance Method Summary collapse
- #clear ⇒ Object
- #do_action(ctx, _values, _index) ⇒ Object
-
#initialize(thunks, values, index) ⇒ ThunkNode
constructor
A new instance of ThunkNode.
Constructor Details
#initialize(thunks, values, index) ⇒ ThunkNode
Returns a new instance of ThunkNode.
115 116 117 118 119 120 |
# File 'lib/packcr/parser.rb', line 115 def initialize(thunks, values, index) @thunks = thunks @values = values @index = index values[index] ||= Value.new if values end |
Instance Attribute Details
#index ⇒ Object
Returns the value of attribute index.
113 114 115 |
# File 'lib/packcr/parser.rb', line 113 def index @index end |
#thunks ⇒ Object
Returns the value of attribute thunks.
113 114 115 |
# File 'lib/packcr/parser.rb', line 113 def thunks @thunks end |
#values ⇒ Object
Returns the value of attribute values.
113 114 115 |
# File 'lib/packcr/parser.rb', line 113 def values @values end |
Instance Method Details
#clear ⇒ Object
128 129 130 |
# File 'lib/packcr/parser.rb', line 128 def clear @thunks.clear end |
#do_action(ctx, _values, _index) ⇒ Object
122 123 124 125 126 |
# File 'lib/packcr/parser.rb', line 122 def do_action(ctx, _values, _index) @thunks.each do |thunk| thunk.do_action(ctx, @values, @index) end end |