Class: LogicalNode

Inherits:
BinaryexpressionNode show all
Defined in:
lib/nodes.rb

Instance Method Summary collapse

Methods inherited from BinaryexpressionNode

#initialize

Constructor Details

This class inherits a constructor from BinaryexpressionNode

Instance Method Details

#evaluate(scope) ⇒ Object



210
211
212
# File 'lib/nodes.rb', line 210

def evaluate(scope)
  return eval("#{@lhs.evaluate(scope)}#{@op}#{@rhs.evaluate(scope)}") # Not possible to use send-method since ruby TrueClass (Ruby bools) has no method for && or ||.
end