Skip to content

Instantly share code, notes, and snippets.

@yuu-ito
Created August 27, 2015 05:52
Show Gist options
  • Select an option

  • Save yuu-ito/13fdde4c867cf5a3be6d to your computer and use it in GitHub Desktop.

Select an option

Save yuu-ito/13fdde4c867cf5a3be6d to your computer and use it in GitHub Desktop.

Revisions

  1. yuu-ito created this gist Aug 27, 2015.
    8 changes: 8 additions & 0 deletions progress_bar_in_console.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    puts "start!"
    bar ="->"
    (1..5).each {
    print "\r#{bar}"
    sleep 0.5
    bar = "-"+bar
    }
    puts "\nend!"