Class: Estreet::WhileStatement
- Defined in:
- lib/estreet/loops.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(test, body) ⇒ WhileStatement
constructor
A new instance of WhileStatement.
Methods inherited from Statement
Methods inherited from Node
Constructor Details
#initialize(test, body) ⇒ WhileStatement
Returns a new instance of WhileStatement.
3 4 5 6 |
# File 'lib/estreet/loops.rb', line 3 def initialize(test, body) @test = test.to_expression @body = body.to_statement end |
Instance Method Details
#attributes ⇒ Object
8 9 10 |
# File 'lib/estreet/loops.rb', line 8 def attributes super.merge(test: @test, body: @body) end |