Module: TTYPromptHelper
- Included in:
- Devlogs::CLI, IssueManager
- Defined in:
- lib/devlogs/helper/tty_prompt_helper.rb
Overview
Utility module for tty-prompt library
Defined Under Namespace
Modules: Validator
Instance Method Summary collapse
-
#build_select_prompt(data:, text:) ⇒ Object
Builds a basic select prompt using the provided data.
Instance Method Details
#build_select_prompt(data:, text:) ⇒ Object
Builds a basic select prompt using the provided data
16 17 18 19 20 21 22 23 24 |
# File 'lib/devlogs/helper/tty_prompt_helper.rb', line 16 def build_select_prompt(data:, text:) ttyprompt = TTY::Prompt.new ttyprompt.select(text) do || data.each_with_index do |d, index| .choice d, index end end end |