Class: EacCli::RunnerWith::Confirmation::InputResult
- Defined in:
- lib/eac_cli/runner_with/confirmation/input_result.rb
Constant Summary collapse
- INPUT_NO_FOR_ONE =
'n'- INPUT_NO_FOR_ALL =
'N'- INPUT_YES_FOR_ONE =
'y'- INPUT_YES_FOR_ALL =
'Y'- INPUT_FOR_ONE =
[INPUT_NO_FOR_ONE, INPUT_YES_FOR_ONE].freeze
- INPUT_FOR_ALL =
[INPUT_NO_FOR_ALL, INPUT_YES_FOR_ALL].freeze
- INPUT_NO =
[INPUT_NO_FOR_ONE, INPUT_NO_FOR_ALL].freeze
- INPUT_YES =
[INPUT_YES_FOR_ONE, INPUT_YES_FOR_ALL].freeze
- INPUT_LIST =
[INPUT_NO_FOR_ALL, INPUT_NO_FOR_ONE, INPUT_YES_FOR_ONE, INPUT_YES_FOR_ALL] .freeze
Class Method Summary collapse
- .by_message(message) ⇒ EacCli::RunnerWith::Confirmation::InputResult
- .input_value_by_speaker(message) ⇒ String
Instance Method Summary collapse
Class Method Details
.by_message(message) ⇒ EacCli::RunnerWith::Confirmation::InputResult
23 24 25 |
# File 'lib/eac_cli/runner_with/confirmation/input_result.rb', line 23 def () new(input_value_by_speaker()) end |
.input_value_by_speaker(message) ⇒ String
29 30 31 |
# File 'lib/eac_cli/runner_with/confirmation/input_result.rb', line 29 def input_value_by_speaker() input(, list: INPUT_LIST, ignore_case: false) end |
Instance Method Details
#confirm? ⇒ Boolean
37 38 39 |
# File 'lib/eac_cli/runner_with/confirmation/input_result.rb', line 37 def confirm? input_value_to_bool(INPUT_NO, INPUT_YES) end |
#for_all? ⇒ Boolean
42 43 44 |
# File 'lib/eac_cli/runner_with/confirmation/input_result.rb', line 42 def for_all? input_value_to_bool(INPUT_FOR_ONE, INPUT_FOR_ALL) end |