Skip to content

End of Life Ruby 3.0 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) { || ... }

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.

See also #first? #text #breakable also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1