Class: NotNode

Inherits:
Node
  • Object
show all
Defined in:
lib/nodes/basenodes.rb

Instance Attribute Summary

Attributes inherited from Node

#value

Instance Method Summary collapse

Methods inherited from Node

#to_s

Constructor Details

#initialize(node) ⇒ NotNode

Returns a new instance of NotNode.



77
78
79
# File 'lib/nodes/basenodes.rb', line 77

def initialize(node)
  @node = node
end

Instance Method Details

#evaluateObject



81
82
83
# File 'lib/nodes/basenodes.rb', line 81

def evaluate
  not @node.evaluate
end