Class | PrettyPrint::Text
In: | prettyprint.rb
Parent: | Object

### Methods

add new output

### Attributes

width | [R] |

### Public Class methods

new()

[Source]

    # File prettyprint.rb, line 262
        def initialize
          @objs = []
          @width = 0
        end

### Public Instance methods

add(obj, width)

[Source]

    # File prettyprint.rb, line 273
        def add(obj, width)
          @objs << obj
          @width += width
        end

output(out, output_width)

[Source]

    # File prettyprint.rb, line 268
        def output(out, output_width)
          @objs.each {|obj| out << obj}
          output_width + @width
        end

[Validate]