Class: Doomfire::Spinner
- Defined in:
- lib/doomfire/spinner.rb
Overview
Same output as the Terminal class, but this runs in a separate thread, so the main process can continue with its work
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
#exit_requested, #fire_width, #pixels
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Doomfire::Base
Instance Method Details
#run ⇒ Object
7 8 9 |
# File 'lib/doomfire/spinner.rb', line 7 def run @thread = Thread.start { fire_loop } end |
#stop ⇒ Object
11 12 13 14 |
# File 'lib/doomfire/spinner.rb', line 11 def stop @exit_requested = true @thread.join end |