instance method
PrettyPrint#group_sub
() { () -> untyped } -> untyped
group_sub() { || ... }
lib/prettyprint.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prettyprint.rb, line 263
def group_sub
group = Group.new(@group_stack.last.depth + 1)
@group_stack.push group
@group_queue.enq group
begin
yield
ensure
@group_stack.pop
if group.breakables.empty?
@group_queue.delete group
end
end
end
Takes a block and queues a new group that is indented 1 level further.