Class: StoreNode
Overview
def evaluate()
return @left.evaluate() % @right.evaluate()
end
end
Instance Attribute Summary
Attributes inherited from UnaryNode
Instance Method Summary collapse
- #evaluate ⇒ Object
-
#initialize(subTree) ⇒ StoreNode
constructor
A new instance of StoreNode.
Constructor Details
#initialize(subTree) ⇒ StoreNode
Returns a new instance of StoreNode.
71 72 73 |
# File 'lib/ast.rb', line 71 def initialize(subTree) super(subTree) end |
Instance Method Details
#evaluate ⇒ Object
74 75 76 |
# File 'lib/ast.rb', line 74 def evaluate $calc.memory = @subTree.evaluate() end |