Method: PrettyPrint::Text#initialize
- Defined in:
- lib/prettyprint.rb
#initialize ⇒ Text
Creates a new text object.
This constructor takes no arguments.
The workflow is to append a PrettyPrint::Text object to the buffer, and being able to call the buffer.last() to reference it.
As there are objects, use PrettyPrint::Text#add to include the objects and the width to utilized by the String version of this object.
312 313 314 315 |
# File 'lib/prettyprint.rb', line 312 def initialize @objs = [] @width = 0 end |