Sha256: 0ab996ee65cff07382454d2b9a7272152cfa03aa9d0bf3d9981eb6b753e8460e
Contents?: true
Size: 519 Bytes
Versions: 3
Compression:
Stored size: 519 Bytes
Contents
# frozen_string_literal: true module Doomfire # Same output as the Terminal class, but this runs in a separate thread, # so the main process can continue with its work class Spinner < Terminal def run @thread = Thread.start { fire_loop } end def stop @exit_requested = true @thread.join end private def prepare_output @fire_height = 35 @fire_width = Doomfire::WindowSize.new.terminal_width Paint.mode = 0xFFFFFF clear_screen end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
doomfire-0.3.2 | lib/doomfire/spinner.rb |
doomfire-0.3.1 | lib/doomfire/spinner.rb |
doomfire-0.3.0 | lib/doomfire/spinner.rb |