Sha256: 5bdf2faff793f3690872a17dc98f60bee208bbac5f4ce74587330b3505729b92
Contents?: true
Size: 620 Bytes
Versions: 14
Compression:
Stored size: 620 Bytes
Contents
module CC module Analyzer module Formatters class Spinner def initialize(text) @spinner = TTY::Spinner.new(text) end def start @thread = Thread.new do loop do @spinning = true spinner.spin sleep 0.075 end end end def stop(text = "Done!") if @spinning spinner.stop(text) print("\n") @thread.kill end @spinning = false end private attr_reader :spinner end end end end
Version data entries
14 entries across 14 versions & 1 rubygems