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.



29
30
31
# File 'lib/hammer_cli_katello/content_view_purge.rb', line 29

def initialize(command)
  @command = command
end

Instance Method Details

#get_options(_defined_options, result) ⇒ Object



33
34
35
36
37
38
# File 'lib/hammer_cli_katello/content_view_purge.rb', line 33

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