Class: Vcsmap::ProgressBar
- Inherits:
-
Object
- Object
- Vcsmap::ProgressBar
- Defined in:
- lib/vcsmap/progress_bar.rb
Instance Method Summary collapse
- #clear ⇒ Object
-
#initialize(count) ⇒ ProgressBar
constructor
A new instance of ProgressBar.
- #step ⇒ Object
Constructor Details
#initialize(count) ⇒ ProgressBar
Returns a new instance of ProgressBar.
5 6 7 |
# File 'lib/vcsmap/progress_bar.rb', line 5 def initialize(count) @bar = TTY::ProgressBar.new("Loading #{count} possible results [:bar]", total: count) end |
Instance Method Details
#clear ⇒ Object
13 14 15 16 |
# File 'lib/vcsmap/progress_bar.rb', line 13 def clear print "\r" $stdout.flush end |
#step ⇒ Object
9 10 11 |
# File 'lib/vcsmap/progress_bar.rb', line 9 def step @bar.advance end |