Class: See::Runner::ProgressIndicator
- Inherits:
-
Object
- Object
- See::Runner::ProgressIndicator
- Defined in:
- lib/see/runner.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.start(things_todo_count) ⇒ Object
34 35 36 37 38 |
# File 'lib/see/runner.rb', line 34 def self.start(things_todo_count) progress = ProgressIndicator.new progress.start(things_todo_count) progress end |
Instance Method Details
#start(things_todo_count) ⇒ Object
40 41 42 43 44 45 46 47 48 |
# File 'lib/see/runner.rb', line 40 def start(things_todo_count) @progress = Thread.new do print "Pulling data from #{things_todo_count} source#{things_todo_count == 1 ? '' : 's'}" loop do sleep 0.25 print '.' end end end |
#stop ⇒ Object
50 51 52 |
# File 'lib/see/runner.rb', line 50 def stop @progress.kill end |