PrettyPrint::SingleLine
is used by PrettyPrint.singleline_format
It is passed to be similar to a PrettyPrint
object itself, by responding to:
but instead, the output has no line breaks
Class Public methods
new(output, maxwidth=nil, newline=nil) Link
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.
Instance Public methods
breakable(sep=' ', width=nil) Link
Appends sep
to the text to be output. By default sep
is ‘ ’
width
argument is here for compatibility. It is a noop argument.
first?() Link
This is used as a predicate, and ought to be called first.
group(indent=nil, open_obj='', close_obj='', open_width=nil, close_width=nil) Link
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.