Class: EXEL::SequenceNode
Overview
A node in the AST that has as its children a sequence of nodes to be run sequentially
Instance Attribute Summary
Attributes inherited from ASTNode
Instance Method Summary collapse
-
#initialize(*children) ⇒ SequenceNode
constructor
A new instance of SequenceNode.
- #run(context) ⇒ Object
Methods inherited from ASTNode
Constructor Details
#initialize(*children) ⇒ SequenceNode
Returns a new instance of SequenceNode.
8 9 10 11 |
# File 'lib/exel/sequence_node.rb', line 8 def initialize(*children) @instruction = NullInstruction.new @children = children end |
Instance Method Details
#run(context) ⇒ Object
13 14 15 |
# File 'lib/exel/sequence_node.rb', line 13 def run(context) @children.each { |child| child.run(context) } end |