Installation
Installation and usage
gem install pobarsrequire 'pobars'Usage and api
Pobars functions accepts number between 1 to 100 inclusive to render progressbar. You can pass float numbers as well.
Simplest usage:
print Pobars.regular(10)
# -> progress: █████............................................. 10% Options as hash params
| hash param | default |
|---|---|
| label | progress: |
| length | 50 |
| symbol | █ |
| remaining_symbol | . |
# Change params to produce different progress bars.
Pobars.circular(percent, label:"progress:", length:50, symbol:"█", remaining_symbol:".")
Pobars.regular(percent, label:"progress:", length:50, symbol:"█", remaining_symbol:".")
(1..100).each do |p|
Pobars.regular(p)
sleep(0.1)
end
# -> one line progressbar
# You should put puts "" after end of processing