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

Methods

add   new   output  

Attributes

width  [R] 

Public Class methods

[Source]

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

Public Instance methods

[Source]

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

[Source]

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

[Validate]

ruby-doc.org is a service of James Britt and Happy Camper Studios, a Ruby application development company in Phoenix, AZ.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.