Class: NotNode
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
- #evaluate ⇒ Object
-
#initialize(node) ⇒ NotNode
constructor
A new instance of NotNode.
- #to_s ⇒ Object
Constructor Details
#initialize(node) ⇒ NotNode
Returns a new instance of NotNode.
128 129 130 |
# File 'lib/nodes/basenodes.rb', line 128 def initialize(node) @node = node end |
Instance Method Details
#evaluate ⇒ Object
136 137 138 |
# File 'lib/nodes/basenodes.rb', line 136 def evaluate not @node.evaluate end |
#to_s ⇒ Object
132 133 134 |
# File 'lib/nodes/basenodes.rb', line 132 def to_s "not #{@node}" end |