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