Class: Vedeu::Renderer
- Inherits:
-
Object
- Object
- Vedeu::Renderer
- Defined in:
- lib/vedeu/output/renderer.rb
Overview
Converts a grid of Char objects into a stream of escape sequences and content suitable for a terminal.
Instance Attribute Summary collapse
-
#output ⇒ Object
readonly
private
Returns the value of attribute output.
Class Method Summary collapse
Instance Method Summary collapse
Constructor Details
#initialize(*output) ⇒ Vedeu::Renderer
16 17 18 |
# File 'lib/vedeu/output/renderer.rb', line 16 def initialize(*output) @output = output end |
Instance Attribute Details
#output ⇒ Object (readonly, private)
Returns the value of attribute output.
27 28 29 |
# File 'lib/vedeu/output/renderer.rb', line 27 def output @output end |
Class Method Details
.render(*output) ⇒ String
10 11 12 |
# File 'lib/vedeu/output/renderer.rb', line 10 def self.render(*output) new(*output).render end |
Instance Method Details
#render ⇒ String
21 22 23 |
# File 'lib/vedeu/output/renderer.rb', line 21 def render Array(output).flatten.map(&:to_s).join end |