Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. 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.2 · 3.1 · 3.0