Class: HammerCLIKatello::ContentViewPurgeCommand::ContentViewIdParamSource

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

Instance Method Summary collapse

Constructor Details

#initialize(command) ⇒ ContentViewIdParamSource

Returns a new instance of ContentViewIdParamSource.



31
32
33
# File 'lib/hammer_cli_katello/content_view_purge.rb', line 31

def initialize(command)
  @command = command
end

Instance Method Details

#get_options(_defined_options, result) ⇒ Object



35
36
37
38
39
40
# File 'lib/hammer_cli_katello/content_view_purge.rb', line 35

def get_options(_defined_options, result)
  if result['option_id'].nil? && result['option_name']
    result['option_id'] = @command.resolver.content_view_id(result)
  end
  result
end