# File lib/interact/progress.rb, line 12 def start! @dots ||= Thread.new do before_sync = $stdout.sync $stdout.sync = true printed = false i = 1 until @stop_dots if printed print "\b" * DOT_COUNT end print ("." * i).ljust(DOT_COUNT) printed = true if i == DOT_COUNT i = 0 else i += 1 end sleep DOT_TICK end if printed print "\b" * DOT_COUNT print " " * DOT_COUNT print "\b" * DOT_COUNT end $stdout.sync = before_sync @stop_dots = nil end end
Generated with the Darkfish Rdoc Generator 2.