Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

PrettyPrint::SingleLine.new

new(output, maxwidth=nil, newline=nil)

Create a PrettyPrint::SingleLine object

Arguments:

  • output - String (or similar) to store rendered text. Needs to respond to ‘<<’

  • maxwidth - Argument position expected to be here for compatibility.

    This argument is a noop.
  • newline - Argument position expected to be here for compatibility.

    This argument is a noop.
See also #breakable #first? also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1