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, #stroke_path
Constructor Details
#initialize(output = STDOUT, columns = 80, lines = 25) ⇒ TextCanvas
Returns a new instance of TextCanvas.
53 54 55 56 57 58 |
# File 'lib/origami/graphics/render.rb', line 53 def initialize(output = STDOUT, columns = 80, lines = 25) super() @output = output @columns, @lines = columns, lines end |
Instance Method Details
#write_text(s) ⇒ Object
60 61 62 |
# File 'lib/origami/graphics/render.rb', line 60 def write_text(s) @output.print(s) end |