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
9 10 11 |
# File 'lib/vedeu/output/render_interface.rb', line 9 def initialize(interface) @interface = interface end |
Class Method Details
.call(interface) ⇒ Object
5 6 7 |
# File 'lib/vedeu/output/render_interface.rb', line 5 def self.call(interface) new(interface).render end |
Instance Method Details
#render ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/vedeu/output/render_interface.rb', line 13 def render out = [ClearInterface.call(interface)] interface.lines.each_with_index do |line, index| out << interface.origin(index) out << line.to_s end out.join end |