Class: BoolNode
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
- #evaluate ⇒ Object
-
#initialize(value) ⇒ BoolNode
constructor
A new instance of BoolNode.
Methods inherited from Node
Constructor Details
#initialize(value) ⇒ BoolNode
Returns a new instance of BoolNode.
34 35 36 37 |
# File 'lib/nodes/basenodes.rb', line 34 def initialize(value) @value = true if value == ScopeManager.true_value @value = false if value == ScopeManager.false_value end |
Instance Method Details
#evaluate ⇒ Object
39 40 41 |
# File 'lib/nodes/basenodes.rb', line 39 def evaluate @value end |