Sha256: 4d3d2cf503e3953a2b92436086b86ea0440fa503c457c3e38315e20680f21f3c

Contents?: true

Size: 334 Bytes

Versions: 12

Compression:

Stored size: 334 Bytes

Contents

# coding: utf-8

require 'tty-progressbar'

files = [
  'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', 'file5.txt',
  'file6.txt', 'file7.txt', 'file8.txt', 'file9.txt', 'file10.txt'
]

bar = TTY::ProgressBar.new("downloading :file :percent", total: files.size)
10.times do |num|
  sleep(0.1)
  bar.advance(file: files[num])
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
tty-progressbar-0.13.0 examples/tokens.rb
tty-progressbar-0.12.2 examples/tokens.rb
tty-progressbar-0.12.1 examples/tokens.rb
tty-progressbar-0.12.0 examples/tokens.rb
tty-progressbar-0.11.0 examples/tokens.rb
tty-progressbar-0.10.1 examples/tokens.rb
tty-progressbar-0.10.0 examples/tokens.rb
tty-progressbar-0.9.0 examples/tokens.rb
tty-progressbar-0.8.1 examples/tokens.rb
tty-progressbar-0.8.0 examples/tokens.rb
tty-progressbar-0.7.0 examples/tokens.rb
tty-progressbar-0.6.0 examples/tokens.rb