Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

kachick/terminal-progress_bar

Repository files navigation

terminal-progress_bar

  • This repository is archived
  • No longer maintained
  • All versions have been removed from https://rubygems.org to free up valuable namespace for other developers.

Build Status

Description

100% |***********************************************************************|

Usage

Try below scenario and yor imaginations on REPL(irb/pry).

Setup

require 'terminal/progressbar'

Flexible handling

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

Auto printing under declared interval

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

Install

$ gem install terminal-progress_bar

License

The MIT X11 License Copyright (c) 2012 Kenichi Kamiya See MIT-LICENSE for further details.

About

100% |***********************************************************************|

Topics

Resources

License

Stars

Watchers

Forks

Languages