Module: DatabaseCopy::ImportUI
- Defined in:
- lib/database_copy.rb
Constant Summary collapse
- @@spinner =
nil
Class Method Summary collapse
- .clear_line ⇒ Object
- .color ⇒ Object
- .error(message) ⇒ Object
- .finish(message = "") ⇒ Object
- .info(message) ⇒ Object
- .start(message) ⇒ Object
- .warn(message) ⇒ Object
Class Method Details
.clear_line ⇒ Object
27 28 29 |
# File 'lib/database_copy.rb', line 27 def self.clear_line @@spinner&.clear_line end |
.color ⇒ Object
45 46 47 |
# File 'lib/database_copy.rb', line 45 def self.color @@color ||= Pastel.new end |
.error(message) ⇒ Object
23 24 25 |
# File 'lib/database_copy.rb', line 23 def self.error() @@spinner&.error() end |
.finish(message = "") ⇒ Object
31 32 33 |
# File 'lib/database_copy.rb', line 31 def self.finish( = "") @@spinner&.success() end |
.info(message) ⇒ Object
35 36 37 38 |
# File 'lib/database_copy.rb', line 35 def self.info() clear_line puts end |
.start(message) ⇒ Object
18 19 20 21 |
# File 'lib/database_copy.rb', line 18 def self.start() @@spinner ||= TTY::Spinner.new() @@spinner&.auto_spin end |
.warn(message) ⇒ Object
40 41 42 43 |
# File 'lib/database_copy.rb', line 40 def self.warn() clear_line puts color.yellow end |