Class: UserInput
- Inherits:
-
Object
- Object
- UserInput
- Defined in:
- lib/yadecli/io/user_input.rb
Overview
User Input
Class Method Summary collapse
Class Method Details
.ask(message, config_key) ⇒ Object
8 9 10 11 12 |
# File 'lib/yadecli/io/user_input.rb', line 8 def self.ask(, config_key) prompt = TTY::Prompt.new prompt.ask(, default: Yade::Common::Config::ComposerConfig[config_key] ||= '') end |
.select_branch(repo_name) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/yadecli/io/user_input.rb', line 14 def self.select_branch(repo_name) prompt = TTY::Prompt.new branches = Yadecli::Client::GitlabClient.new.get_branch_names(repo_name) prompt.select('Select the branch you want to clone', branches) end |