rake-progressbar icon indicating copy to clipboard operation
rake-progressbar copied to clipboard

Added the `silent` option.

Open vladtsf opened this issue 10 years ago • 0 comments

If you want to create an instance of RakeProgressbar but, at the same time, opt out of it actually displaying the progress in the terminal, now you can do something like this:

bar = RakeProgressbar.new(100)
bar.silent = true # <=
100.times do 
 bar.inc # nothing is printed in the terminal
end
bar.finished

It might be useful if you want to make the progress bar optional. So, you'd just create an object and set the silent property to either true or false depending on whether it's supposed to be silent or not.

Thanks!

vladtsf avatar Jul 29 '15 22:07 vladtsf