Class: SilentProgressbar
- Inherits:
-
ProgressBar::Base
- Object
- ProgressBar::Base
- SilentProgressbar
- Defined in:
- lib/git_fame/silent_progressbar.rb
Instance Method Summary collapse
-
#initialize(name, steps, active = false) ⇒ SilentProgressbar
constructor
A new instance of SilentProgressbar.
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 |