Class: TimesNode

Inherits:
BinaryNode show all
Defined in:
lib/ast.rb

Instance Attribute Summary

Attributes inherited from BinaryNode

#left, #right

Instance Method Summary collapse

Constructor Details

#initialize(left, right) ⇒ TimesNode

Returns a new instance of TimesNode.



51
52
53
# File 'lib/ast.rb', line 51

def initialize(left, right)
  super(left,right)
end

Instance Method Details

#evaluateObject



54
55
56
# File 'lib/ast.rb', line 54

def evaluate() 
   @left.evaluate() * @right.evaluate()
end