Class: KuberKit::UI::Interactive
- Defined in:
- lib/kuber_kit/ui/interactive.rb
Defined Under Namespace
Classes: TaskGroup
Instance Method Summary collapse
- #create_task(title, &block) ⇒ Object
- #create_task_group ⇒ Object
- #print_error(title, text) ⇒ Object
- #print_info(title, text) ⇒ Object
- #print_warning(title, text) ⇒ Object
- #prompt(text, options, &callback) ⇒ Object
Instance Method Details
#create_task(title, &block) ⇒ Object
12 13 14 15 |
# File 'lib/kuber_kit/ui/interactive.rb', line 12 def create_task(title, &block) init_if_needed CLI::UI::Spinner.spin(title, &block) end |
#create_task_group ⇒ Object
7 8 9 10 |
# File 'lib/kuber_kit/ui/interactive.rb', line 7 def create_task_group init_if_needed TaskGroup.new end |
#print_error(title, text) ⇒ Object
21 22 23 |
# File 'lib/kuber_kit/ui/interactive.rb', line 21 def print_error(title, text) print_in_frame(title, text, color: :red) end |
#print_info(title, text) ⇒ Object
17 18 19 |
# File 'lib/kuber_kit/ui/interactive.rb', line 17 def print_info(title, text) print_in_frame(title, text, color: :blue) end |
#print_warning(title, text) ⇒ Object
25 26 27 |
# File 'lib/kuber_kit/ui/interactive.rb', line 25 def print_warning(title, text) print_in_frame(title, text, color: :yellow) end |