Class: Vedeu::ClearInterface
- Inherits:
-
Object
- Object
- Vedeu::ClearInterface
- Defined in:
- lib/vedeu/output/clear_interface.rb
Class Method Summary collapse
Instance Method Summary collapse
- #clear ⇒ Object
-
#initialize(interface) ⇒ ClearInterface
constructor
A new instance of ClearInterface.
Constructor Details
#initialize(interface) ⇒ ClearInterface
Returns a new instance of ClearInterface.
7 8 9 |
# File 'lib/vedeu/output/clear_interface.rb', line 7 def initialize(interface) @interface = interface end |
Class Method Details
.call(interface) ⇒ Object
3 4 5 |
# File 'lib/vedeu/output/clear_interface.rb', line 3 def self.call(interface) new(interface).clear end |
Instance Method Details
#clear ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/vedeu/output/clear_interface.rb', line 11 def clear interface_lines.inject([colours]) do |line, index| line << interface.origin(index) line << ' ' * interface.width line << interface.origin(index) end.join end |