Class: IfNode
Overview
If Statement Nodes
Instance Attribute Summary collapse
-
#argument ⇒ Object
Returns the value of attribute argument.
Attributes inherited from Node
Instance Method Summary collapse
- #evaluate ⇒ Object
-
#initialize(argument, node) ⇒ IfNode
constructor
A new instance of IfNode.
Methods inherited from Node
Constructor Details
#initialize(argument, node) ⇒ IfNode
Returns a new instance of IfNode.
107 108 109 |
# File 'lib/nodes/stmtnodes.rb', line 107 def initialize(argument, node) @argument, @node = argument, node end |
Instance Attribute Details
#argument ⇒ Object
Returns the value of attribute argument.
105 106 107 |
# File 'lib/nodes/stmtnodes.rb', line 105 def argument @argument end |
Instance Method Details
#evaluate ⇒ Object
111 112 113 |
# File 'lib/nodes/stmtnodes.rb', line 111 def evaluate @value = @node.evaluate end |