Class: PauseNode
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
- #evaluate ⇒ Object
-
#initialize(value) ⇒ PauseNode
constructor
A new instance of PauseNode.
Methods inherited from Node
Constructor Details
#initialize(value) ⇒ PauseNode
Returns a new instance of PauseNode.
198 199 200 |
# File 'lib/nodes/stmtnodes.rb', line 198 def initialize(value) super(value) end |
Instance Method Details
#evaluate ⇒ Object
202 203 204 205 |
# File 'lib/nodes/stmtnodes.rb', line 202 def evaluate @value = 0 if @value.evaluate.negative? sleep @value.evaluate end |