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.
7 8 9 10 |
# File 'lib/exel/sequence_node.rb', line 7 def initialize(*children) @instruction = NullInstruction.new @children = children end |
Instance Method Details
#run(context) ⇒ Object
12 13 14 |
# File 'lib/exel/sequence_node.rb', line 12 def run(context) @children.each { |child| child.run(context) } end |