Class: PlusNode
Overview
plus———————————
Instance Attribute Summary
Attributes inherited from UnaryNode
Instance Method Summary collapse
- #evaluate ⇒ Object
-
#initialize(subTree) ⇒ PlusNode
constructor
A new instance of PlusNode.
Constructor Details
#initialize(subTree) ⇒ PlusNode
Returns a new instance of PlusNode.
85 86 87 |
# File 'lib/ast.rb', line 85 def initialize(subTree) super(subTree) end |
Instance Method Details
#evaluate ⇒ Object
88 89 90 |
# File 'lib/ast.rb', line 88 def evaluate $calc.memory =$calc.memory + subTree.evaluate() end |