Class: DivideNode

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) ⇒ DivideNode

Returns a new instance of DivideNode.



130
131
132
# File 'lib/ast.rb', line 130

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

Instance Method Details

#evaluateObject



134
135
136
# File 'lib/ast.rb', line 134

def evaluate 
  @left.evaluate/@right.evaluate
end