On this page
Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class · Ruby 3.4
Prism::BlockNode
Represents a block of ruby code.
[1, 2, 3].each { |i| puts x }
^^^^^^^^^^^^^^
Class methods 2
Instance methods 16
Attributes
Read
The body of the block.
[1, 2, 3].each { |i| puts x }
^^^^^^
Read
The local variables declared in the block.
[1, 2, 3].each { |i| puts x } # locals: [:i]
^
Read
The parameters of the block.
[1, 2, 3].each { |i| puts x }
^^^
[1, 2, 3].each { puts _1 }
^^^^^^^^^^^
[1, 2, 3].each { puts it }
^^^^^^^^^^^