Class: HammerCLIKatello::ContentViewNameResolvable::ContentViewParamSource

Inherits:
HammerCLI::Options::Sources::Base
  • Object
show all
Defined in:
lib/hammer_cli_katello/content_view_name_resolvable.rb

Instance Method Summary collapse

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 get_options(_defined_options, 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.scoped_options('content_view', result, :single))
  end
  result
end