Class: HighlineWrapper::CheckboxQuestion
- Defined in:
- lib/highline_wrapper/checkbox_question.rb
Class Method Summary collapse
Methods inherited from Question
ask_highline, format_options, format_selection, recurse, return_empty_defaults
Class Method Details
.ask(prompt, choices, options) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/highline_wrapper/checkbox_question.rb', line 8 def ask(prompt, choices, ) indices = ask_highline((prompt, choices)) return format_multiple_selections(choices, indices, [:with_indexes]) unless indices.empty? return recurse(prompt, choices, ) if [:required] return return_empty_defaults() if [:defaults].empty? return_defaults(choices, ) end |