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
Instance Method Summary collapse
Class Method Details
.by_message(message) ⇒ EacCli::RunnerWith::Confirmation::InputResult
25 26 27 |
# File 'lib/eac_cli/runner_with/confirmation/input_result.rb', line 25 def () new(input(, list: INPUT_LIST)) end |
Instance Method Details
#confirm? ⇒ Boolean
33 34 35 |
# File 'lib/eac_cli/runner_with/confirmation/input_result.rb', line 33 def confirm? input_value_to_bool(INPUT_NO, INPUT_YES) end |
#for_all? ⇒ Boolean
38 39 40 |
# File 'lib/eac_cli/runner_with/confirmation/input_result.rb', line 38 def for_all? input_value_to_bool(INPUT_FOR_ONE, INPUT_FOR_ALL) end |