Progress Bar for terminal and KDE
Find a file
2014-12-23 20:36:04 +01:00
lib console: finish => newline 2014-12-23 20:35:56 +01:00
test init 2014-12-23 17:32:29 +01:00
.document init 2014-12-23 17:32:29 +01:00
.gitignore init 2014-12-23 17:32:29 +01:00
Gemfile init 2014-12-23 17:32:29 +01:00
Gemfile.lock init 2014-12-23 17:32:29 +01:00
LICENSE.txt init 2014-12-23 17:32:29 +01:00
progress-bar.gemspec Regenerate gemspec for version 0.3.5 2014-12-23 20:36:04 +01:00
Rakefile description 2014-12-23 17:38:24 +01:00
README.md README. class Progress -> ProgressBar 2014-12-23 18:19:55 +01:00
VERSION Version bump to 0.3.5 2014-12-23 20:36:02 +01:00

ProgressBar

Usage

This example will use your Terminal, if possible. If your program will be started without a Terminal, it will use kdialog for display a window.

pb = ProgressBar.new 100, 'Initial Text...'
pb.i += 5
pb.inc! 5
pb.text = 'Something different'
pb.inc! 20
pb.text = 'Second phase'
pb.inc! 60
pb.text = 'Last Steps'
pb.inc! 20
pb.text = 'Done!'

If you want to force to use kdialog use ProgressBar::KDialog.new or if you want to use your Console, use ProgressBar::Console.