Class: Twostroke::AST::ForIn
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#lval ⇒ Object
Returns the value of attribute lval.
-
#object ⇒ Object
Returns the value of attribute object.
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Twostroke::AST::Base
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
3 4 5 |
# File 'lib/twostroke/ast/for_in.rb', line 3 def body @body end |
#lval ⇒ Object
Returns the value of attribute lval.
3 4 5 |
# File 'lib/twostroke/ast/for_in.rb', line 3 def lval @lval end |
#object ⇒ Object
Returns the value of attribute object.
3 4 5 |
# File 'lib/twostroke/ast/for_in.rb', line 3 def object @object end |
Instance Method Details
#collapse ⇒ Object
5 6 7 |
# File 'lib/twostroke/ast/for_in.rb', line 5 def collapse self.class.new lval: lval.collapse, object: object.collapse, body: body.collapse end |
#walk(&bk) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/twostroke/ast/for_in.rb', line 9 def walk(&bk) if yield self lval.walk &bk object.walk &bk body.walk &bk end end |