Closed zverok closed 8 years ago
Sorry, I somehow missed this pull request. Both very good suggestions, I especially like with_progress
.
Ideally, this would be two separate pull requests, but no big deal. The first is small enough I'll include it here. A couple small :neckbeard: comments inline.
Sorry, I missed that you added commits to this. Thanks!
Thank you! Maybe new gem version should be released with this functionality?..
Two things.
First (small): change minimal
ProgressBar#max
value from 1 to 0. Rationale: i constantly find myself to write code like:...and it works every time except when array is empty. With this small change, it will work ok with empty arrays also.
Second (huge). I want to share the code I'm constantly finding myself to add to my projects:
ProgressBar::WithProgress
and its (optional) inclusion toEnumerable
s. Just to write the things like: