Class: Chelsea::Spinner
- Inherits:
-
Object
- Object
- Chelsea::Spinner
- Defined in:
- lib/chelsea/spinner.rb
Overview
the spinner we use in Chelsea, needs work
Instance Method Summary collapse
-
#initialize ⇒ Spinner
constructor
A new instance of Spinner.
- #spin_msg(msg) ⇒ Object
Constructor Details
#initialize ⇒ Spinner
Returns a new instance of Spinner.
25 26 27 |
# File 'lib/chelsea/spinner.rb', line 25 def initialize @pastel = Pastel.new end |
Instance Method Details
#spin_msg(msg) ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/chelsea/spinner.rb', line 29 def spin_msg(msg) format = "[#{@pastel.green(':spinner')}] " + @pastel.white(msg) spinner = TTY::Spinner.new( format, success_mark: @pastel.green('+'), hide_cursor: true ) spinner.auto_spin spinner end |