Class: PlusNode
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.
76 77 78 |
# File 'lib/ast.rb', line 76 def initialize(subTree) super(subTree) end |
Instance Method Details
#evaluate ⇒ Object
80 81 82 83 |
# File 'lib/ast.rb', line 80 def evaluate val = subTree.evaluate $calc.memory += val end |