Class: CompStmtNode
Overview
Root Program Node
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
- #evaluate ⇒ Object
-
#initialize(stmt_compstmt) ⇒ CompStmtNode
constructor
A new instance of CompStmtNode.
Methods inherited from Node
Constructor Details
#initialize(stmt_compstmt) ⇒ CompStmtNode
Returns a new instance of CompStmtNode.
251 252 253 254 |
# File 'lib/nodes/basenodes.rb', line 251 def initialize(stmt_compstmt) super @comp_statements = stmt_compstmt end |
Instance Method Details
#evaluate ⇒ Object
256 257 258 259 |
# File 'lib/nodes/basenodes.rb', line 256 def evaluate @comp_statements[0].evaluate @comp_statements[1].evaluate end |