Class: Opal::Rewriters::BlockToIter
- Defined in:
- opal/lib/opal/rewriters/block_to_iter.rb
Constant Summary
Constants inherited from Base
Opal::Rewriters::Base::DUMMY_LOCATION
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#append_to_body, #begin_with_stmts, #dynamic!, #error, #on_top, #prepend_to_body, #process, s, #s, #stmts_of
Instance Method Details
#on_block(node) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'opal/lib/opal/rewriters/block_to_iter.rb', line 8 def on_block(node) recvr, args, body = *node iter_node = s(:iter, args, body) process recvr.updated( nil, (recvr.children + [iter_node]), ) end |