Class: InCSV::Progress
- Inherits:
-
Object
- Object
- InCSV::Progress
- Defined in:
- lib/incsv/console/progress.rb
Instance Method Summary collapse
- #clear ⇒ Object
- #indeterminate ⇒ Object
-
#initialize(output: $stdout, message: "Working...") ⇒ Progress
constructor
A new instance of Progress.
Constructor Details
#initialize(output: $stdout, message: "Working...") ⇒ Progress
Returns a new instance of Progress.
5 6 7 8 |
# File 'lib/incsv/console/progress.rb', line 5 def initialize(output: $stdout, message: "Working...") @output = output @message = end |
Instance Method Details
#clear ⇒ Object
17 18 19 20 |
# File 'lib/incsv/console/progress.rb', line 17 def clear output.print "\r" output.print " " * width end |
#indeterminate ⇒ Object
10 11 12 13 14 15 |
# File 'lib/incsv/console/progress.rb', line 10 def indeterminate loop do line sleep 1 end end |