Skip to content

anvyzhang/progbar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Progbar Gem Version

Progress bar for array iteration.

Features

  • 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.

How to use

Install

gem install progbar

or add

gem 'progbar'

to your Gemfile and bundle install

Code

[1, 2, 3, 4, 5, 6].prog_each{|x| sleep 1} # 'sleep 1' was optional, just an example
[####################--------------------] 50% [00:00:03 left]

Copyright

MIT-LICENSE

About

A rubygem print a progress bar for array iteration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages