Class: SilentProgressbar

Inherits:
ProgressBar::Base
  • Object
show all
Defined in:
lib/git_fame/silent_progressbar.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, steps, active = false) ⇒ SilentProgressbar

Returns a new instance of SilentProgressbar.



9
10
11
12
13
14
15
16
17
# File 'lib/git_fame/silent_progressbar.rb', line 9

def initialize(name, steps, active = false)
  output =  active ? $stdout : File.new("/dev/null", "w")
  super({
    title: name, 
    total: steps, 
    output: output,
    smoothing: 0.6
  })
end