# PrettyPrint::SingleLine (Class)

In: | prettyprint.rb
Parent: | Object

## Methods

breakable first? flush group nest new text

## Public Class methods

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

[Source]

    # File prettyprint.rb, line 360
        def initialize(output, maxwidth=nil, newline=nil)
          @output = output
          @first = [true]
        end

## Public Instance methods

text(obj, width=nil)

[Source]

    # File prettyprint.rb, line 365
        def text(obj, width=nil)
          @output << obj
        end

breakable(sep=' ', width=nil)

[Source]

    # File prettyprint.rb, line 369
        def breakable(sep=' ', width=nil)
          @output << sep
        end

nest(indent) {|| ...}

[Source]

    # File prettyprint.rb, line 373
        def nest(indent)
          yield
        end

group(indent=nil, open_obj='', close_obj='', open_width=nil, close_width=nil) {|| ...}

[Source]

    # File prettyprint.rb, line 377
        def group(indent=nil, open_obj='', close_obj='', open_width=nil, close_width=nil)
          @first.push true
          @output << open_obj
          yield
          @output << close_obj
          @first.pop
        end

flush()

[Source]

    # File prettyprint.rb, line 385
        def flush
        end

first?()

[Source]

    # File prettyprint.rb, line 388
        def first?
          result = @first[-1]
          @first[-1] = false
          result
        end

[Validate]