Class: PrettyPrint::SingleLine

Class | PrettyPrint::SingleLine
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 363
        def initialize(output, maxwidth=nil, newline=nil)
          @output = output
          @first = [true]
        end

### Public Instance methods

breakable(sep=' ', width=nil)

[Source]

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

first?()

[Source]

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

flush()

[Source]

    # File prettyprint.rb, line 388
        def flush
        end

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

[Source]

    # File prettyprint.rb, line 380
        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

nest(indent) {|| ...}

[Source]

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

text(obj, width=nil)

[Source]

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

[Validate]