Class: Doomfire::Spinner

Inherits:
Terminal show all
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

Base::RGB

Instance Attribute Summary

Attributes inherited from Base

#exit_requested, #fire_width, #pixels

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Doomfire::Base

Instance Method Details

#runObject



7
8
9
# File 'lib/doomfire/spinner.rb', line 7

def run
  @thread = Thread.start { fire_loop }
end

#stopObject



11
12
13
14
# File 'lib/doomfire/spinner.rb', line 11

def stop
  @exit_requested = true
  @thread.join
end