Class: ElseNode
Instance Attribute Summary collapse
-
#argument ⇒ Object
Returns the value of attribute argument.
-
#node ⇒ Object
Returns the value of attribute node.
Attributes inherited from Node
Instance Method Summary collapse
- #evaluate ⇒ Object
-
#initialize(node) ⇒ ElseNode
constructor
A new instance of ElseNode.
Methods inherited from Node
Constructor Details
#initialize(node) ⇒ ElseNode
Returns a new instance of ElseNode.
131 132 133 134 |
# File 'lib/nodes/stmtnodes.rb', line 131 def initialize(node) @node = node @argument = BoolNode.new(ScopeManager.true_value) end |
Instance Attribute Details
#argument ⇒ Object
Returns the value of attribute argument.
129 130 131 |
# File 'lib/nodes/stmtnodes.rb', line 129 def argument @argument end |
#node ⇒ Object
Returns the value of attribute node.
129 130 131 |
# File 'lib/nodes/stmtnodes.rb', line 129 def node @node end |
Instance Method Details
#evaluate ⇒ Object
136 137 138 |
# File 'lib/nodes/stmtnodes.rb', line 136 def evaluate @value = @node.evaluate end |