Skip to content

Commit

Permalink
Add logging example
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmurach committed Oct 18, 2020
1 parent bdd58d5 commit 0fe3ede
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions examples/log.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

require_relative "../lib/tty-progressbar"

bar = TTY::ProgressBar.new("[:bar]", total: 10)

10.times do |i|
bar.log("[#{i}] Task")
sleep(0.1)
bar.advance
end

0 comments on commit 0fe3ede

Please sign in to comment.