Module: Morpheus::Cli::PromptHelper
- Defined in:
- lib/morpheus/cli/mixins/prompt_helper.rb
Overview
Mixin for Morpheus::Cli command classes Provides common methods for prompting for input
Instance Method Summary collapse
-
#prompt_value(option_type, options, no_prompt = false, api_params = {}) ⇒ Object
Input value for the option type, usually a string or number if the value is an ID or of type: number.
Instance Method Details
#prompt_value(option_type, options, no_prompt = false, api_params = {}) ⇒ Object
Returns input value for the option type, usually a string or number if the value is an ID or of type: number.
11 12 13 14 |
# File 'lib/morpheus/cli/mixins/prompt_helper.rb', line 11 def prompt_value(option_type, , no_prompt=false, api_params={}) # this does not work with fieldContext, so get rid of it return Morpheus::Cli::OptionTypes.prompt([option_type.merge({'fieldContext' => nil})], , @api_client, api_params, no_prompt)[option_type['fieldName']] end |