Class: StoreNode
Instance Attribute Summary
Attributes inherited from UnaryNode
Instance Method Summary collapse
- #evaluate ⇒ Object
-
#initialize(sub) ⇒ StoreNode
constructor
A new instance of StoreNode.
Constructor Details
#initialize(sub) ⇒ StoreNode
Returns a new instance of StoreNode.
63 64 65 |
# File 'lib/ast.rb', line 63 def initialize(sub) super(sub) end |
Instance Method Details
#evaluate ⇒ Object
67 68 69 70 |
# File 'lib/ast.rb', line 67 def evaluate $calc.memory = subTree.evaluate #El $calc llama a la variable global calc que se llama en el irb>require 'calculator' #irb>$calc = Calculator.new end |