Class: AddNode

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

Overview

hereda de binaryNode

Instance Attribute Summary

Attributes inherited from BinaryNode

#left, #right

Instance Method Summary collapse

Constructor Details

#initialize(left, right) ⇒ AddNode

Returns a new instance of AddNode.



22
23
24
# File 'lib/ast.rb', line 22

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

Instance Method Details

#evaluateObject



26
27
28
29
# File 'lib/ast.rb', line 26

def evaluate() 
  @left.evaluate() + @right.evaluate()
  #los obtiene y los evalua
end