Skip to content
class method

PrettyPrint.singleline_format

(?untyped output, ?::Integer? maxwidth, ?::String? newline, ?^(::Integer) -> ::Integer? genspace) { (::PrettyPrint::SingleLine) -> untyped } -> ::PrettyPrint::_Output
singleline_format(output=''.dup, maxwidth=nil, newline=nil, genspace=nil) { |q| ... }

This is similar to PrettyPrint::format but the result has no breaks.

maxwidth, newline and genspace are ignored.

The invocation of breakable in the block doesn’t break a line and is treated as just an invocation of text.

See also .new #breakable .format #break_outmost_groups also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0