Class: HammerCLIKatello::ContentViewNameResolvable::ContentViewParamSource
- Inherits:
-
HammerCLI::Options::Sources::Base
- Object
- HammerCLI::Options::Sources::Base
- HammerCLIKatello::ContentViewNameResolvable::ContentViewParamSource
- Defined in:
- lib/hammer_cli_katello/content_view_name_resolvable.rb
Instance Method Summary collapse
- #get_options(_defined_options, result) ⇒ Object
-
#initialize(command) ⇒ ContentViewParamSource
constructor
A new instance of ContentViewParamSource.
Constructor Details
#initialize(command) ⇒ ContentViewParamSource
Returns a new instance of ContentViewParamSource.
4 5 6 |
# File 'lib/hammer_cli_katello/content_view_name_resolvable.rb', line 4 def initialize(command) @command = command end |
Instance Method Details
#get_options(_defined_options, result) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/hammer_cli_katello/content_view_name_resolvable.rb', line 8 def (, result) if result['option_content_view_name'] && result['option_content_view_id'].nil? result['option_content_view_id'] = @command.resolver.content_view_id( @command.resolver.('content_view', result, :single)) end result end |