From: Rodrigo Bermejo Date: 2008-11-05T01:22:22+09:00 Subject: Re: Showing a spinner ? Aldric Giacomoni wrote: > How do I show a spinner on the command line interface when a ruby script > is working? I sometimes write things that take a while, and I know I get > impatient when all I see a blinking cursor :) > A spinner has \ | / - all in one spot so it looks like a spinning wheel. > > Thanks! > > --Aldric Here is the idea ..you can make it better.. a=["-","\\","|","/"] n=0 while 1 do print a[n % 4] print "\b" n+=1 sleep 0.1 puts "..#{n}." if (n % 50==0) end -- Posted via http://www.ruby-forum.com/.