Class: BruteCLI::Spinner::Dots
- Inherits:
-
Base
- Object
- Base
- BruteCLI::Spinner::Dots
show all
- Defined in:
- lib/brute_cli/spinner/dots.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#spinning? ⇒ Boolean
19
20
21
|
# File 'lib/brute_cli/spinner/dots.rb', line 19
def spinning?
@tty&.spinning? || false
end
|
#start ⇒ Object
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
|
#stop ⇒ Object
14
15
16
17
|
# File 'lib/brute_cli/spinner/dots.rb', line 14
def stop
@tty&.stop
@tty = nil
end
|