Class: Origami::Graphics::TextCanvas
- Inherits:
-
Object
- Object
- Origami::Graphics::TextCanvas
- Includes:
- Canvas
- Defined in:
- lib/origami/graphics/render.rb
Instance Attribute Summary
Attributes included from Canvas
Instance Method Summary collapse
-
#initialize(output = STDOUT, columns = 80, lines = 25) ⇒ TextCanvas
constructor
A new instance of TextCanvas.
- #write_text(s) ⇒ Object
Methods included from Canvas
#clear, #fill_path, #paint_shading, #stroke_path
Constructor Details
#initialize(output = STDOUT, columns = 80, lines = 25) ⇒ TextCanvas
Returns a new instance of TextCanvas.
49 50 51 52 53 54 |
# File 'lib/origami/graphics/render.rb', line 49 def initialize(output = STDOUT, columns = 80, lines = 25) super() @output = output @columns, @lines = columns, lines end |
Instance Method Details
#write_text(s) ⇒ Object
56 57 58 |
# File 'lib/origami/graphics/render.rb', line 56 def write_text(s) @output.print(s) end |