End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
PrettyPrint::SingleLine#group
group(indent=nil, open_obj='', close_obj='', open_width=nil, close_width=nil) { || ... }
lib/prettyprint.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/prettyprint.rb, line 537
def group(indent=nil, open_obj='', close_obj='', open_width=nil, close_width=nil)
@first.push true
@output << open_obj
yield
@output << close_obj
@first.pop
end
Opens a block for grouping objects to be pretty printed.
Arguments:
-
indent- noop argument. Present for compatibility. -
open_obj- text appended before the &blok. Default is ” -
close_obj- text appended after the &blok. Default is ” -
open_width- noop argument. Present for compatibility. -
close_width- noop argument. Present for compatibility.