- This repository is archived
- No longer maintained
- All versions have been removed from https://rubygems.org to free up valuable namespace for other developers.
100% |***********************************************************************|
Try below scenario and yor imaginations on REPL(irb/pry).
require 'terminal/progressbar'
Terminal::ProgressBar.run mark: '*' do |bar|
50.times do
sleep 0.1
bar.increment!
end
bar.pointer = 15
bar.flush
sleep 2
30.times do
sleep 0.1
bar.increment! 2
end
30.times do
sleep 0.1
bar.decrement! 2
end
bar.pointer = 70
bar.flush
sleep 2
end
Terminal::ProgressBar.auto 0.2, mark: '*' do |bar|
50.times do
sleep 0.1
bar.increment
end
sleep 0.1
bar.pointer = 15
30.times do
sleep 0.1
bar.increment
end
end
$ gem install terminal-progress_bar
The MIT X11 License Copyright (c) 2012 Kenichi Kamiya See MIT-LICENSE for further details.