Object
# File lib/deep_test/ui/console.rb, line 44 def initialize(label) @label = label end
# File lib/deep_test/ui/console.rb, line 69 def show(string) $stdout.print string $stdout.flush end
# File lib/deep_test/ui/console.rb, line 48 def start @start_time = Time.now show "#{@label}: " @thread = Thread.new do index = 0 loop do show FRAMES[index] sleep SECONDS_PER_FRAME show BACKSPACE index = (index + 1) % FRAMES.length end end end
# File lib/deep_test/ui/console.rb, line 62 def stop @stop_time = Time.now @thread.kill if @thread show BACKSPACE show("finished in %.2f seconds\n" % (@stop_time.to_f - @start_time.to_f)) end
[Validate]
Generated with the Darkfish Rdoc Generator 2.