Progress bar for array iteration.
- Print a progress bar while doing iteration on a ruby array using
prog_each
- Print the progress in percentage and time remaining, that you can known about how long it will take to complete the iteration.
- Auto ajust the bar length for terminal width.
gem install progbar
or add
gem 'progbar'
to your Gemfile and bundle install
[1, 2, 3, 4, 5, 6].prog_each{|x| sleep 1} # 'sleep 1' was optional, just an example
[####################--------------------] 50% [00:00:03 left]
MIT-LICENSE