Class: Zaid::Nodes::WhileNode
- Inherits:
-
Struct
- Object
- Struct
- Zaid::Nodes::WhileNode
- Defined in:
- lib/zaid/nodes/while_node.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#condition ⇒ Object
Returns the value of attribute condition.
Instance Method Summary collapse
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body
5 6 7 |
# File 'lib/zaid/nodes/while_node.rb', line 5 def body @body end |
#condition ⇒ Object
Returns the value of attribute condition
5 6 7 |
# File 'lib/zaid/nodes/while_node.rb', line 5 def condition @condition end |
Instance Method Details
#eval(context) ⇒ Object
6 7 8 9 10 |
# File 'lib/zaid/nodes/while_node.rb', line 6 def eval(context) body.eval(context) while condition.eval(context).ruby_value Constants['مجهول'] end |