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.



41
42
43
# File 'lib/ast.rb', line 41

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

Instance Method Details

#evaluateObject



45
46
47
# File 'lib/ast.rb', line 45

def evaluate
  return @left.evaluate * @right.evaluate
end