Class: Vcsmap::ProgressBar

Inherits:
Object
  • Object
show all
Defined in:
lib/vcsmap/progress_bar.rb

Instance Method Summary collapse

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

#clearObject



13
14
15
16
# File 'lib/vcsmap/progress_bar.rb', line 13

def clear
  print "\r"
  $stdout.flush
end

#stepObject



9
10
11
# File 'lib/vcsmap/progress_bar.rb', line 9

def step
  @bar.advance
end