Class: Vedeu::RenderInterface
- Inherits:
-
Object
- Object
- Vedeu::RenderInterface
- Defined in:
- lib/vedeu/output/render_interface.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(interface) ⇒ RenderInterface
constructor
A new instance of RenderInterface.
- #render ⇒ Object
Constructor Details
#initialize(interface) ⇒ RenderInterface
Returns a new instance of RenderInterface.
7 8 9 |
# File 'lib/vedeu/output/render_interface.rb', line 7 def initialize(interface) @interface = interface end |
Class Method Details
.call(interface) ⇒ Object
3 4 5 |
# File 'lib/vedeu/output/render_interface.rb', line 3 def self.call(interface) new(interface).render end |
Instance Method Details
#render ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/vedeu/output/render_interface.rb', line 11 def render out = [interface.clear] processed_lines.each_with_index do |line, index| if index + 1 <= height out << interface.origin(index) out << line.to_s end end out.join end |