Class: BruteCLI::Spinner::Dots

Inherits:
Base
  • Object
show all
Defined in:
lib/brute_cli/spinner/dots.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from BruteCLI::Spinner::Base

Instance Method Details

#spinning?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/brute_cli/spinner/dots.rb', line 19

def spinning?
  @tty&.spinning? || false
end

#startObject



8
9
10
11
12
# File 'lib/brute_cli/spinner/dots.rb', line 8

def start
  stop if spinning?
  @tty = TTY::Spinner.new(output: @output, clear: true)
  @tty.auto_spin
end

#stopObject



14
15
16
17
# File 'lib/brute_cli/spinner/dots.rb', line 14

def stop
  @tty&.stop
  @tty = nil
end