Class: HammerCLIForeman::OptionSources::FieldsParams
- Inherits:
-
HammerCLI::Options::Sources::Base
- Object
- HammerCLI::Options::Sources::Base
- HammerCLIForeman::OptionSources::FieldsParams
- Defined in:
- lib/hammer_cli_foreman/option_sources/fields_params.rb
Instance Method Summary collapse
- #get_options(_defined_options, result) ⇒ Object
-
#initialize(command) ⇒ FieldsParams
constructor
A new instance of FieldsParams.
- #process(defined_options, result) ⇒ Object
Constructor Details
#initialize(command) ⇒ FieldsParams
Returns a new instance of FieldsParams.
4 5 6 |
# File 'lib/hammer_cli_foreman/option_sources/fields_params.rb', line 4 def initialize(command) @command = command end |
Instance Method Details
#get_options(_defined_options, result) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/hammer_cli_foreman/option_sources/fields_params.rb', line 12 def (, result) if @command.respond_to?(:option_fields) && @command.option_fields == ['THIN'] result[HammerCLI.option_accessor_name('thin')] = true end result end |
#process(defined_options, result) ⇒ Object
8 9 10 |
# File 'lib/hammer_cli_foreman/option_sources/fields_params.rb', line 8 def process(, result) (, result) end |