class Doomfire::Spinner
Same output as the Terminal
class, but this runs in a separate thread, so the main process can continue with its work
Public Instance Methods
run()
click to toggle source
# File lib/doomfire/spinner.rb, line 7 def run @thread = Thread.start { fire_loop } end
stop()
click to toggle source
# File lib/doomfire/spinner.rb, line 11 def stop @exit_requested = true @thread.join end
Private Instance Methods
prepare_output()
click to toggle source
# File lib/doomfire/spinner.rb, line 18 def prepare_output @fire_height = 35 @fire_width = Doomfire::WindowSize.new.terminal_width Paint.mode = 0xFFFFFF clear_screen end