Module: HammerCLIKatello::AssociatingCommands::Repository::AddProductOptions

Included in:
AddRepositoryCommand, RemoveRepositoryCommand
Defined in:
lib/hammer_cli_katello/associating_commands.rb

Instance Method Summary collapse

Instance Method Details

#create_option_builderObject



11
12
13
14
15
16
17
18
19
# File 'lib/hammer_cli_katello/associating_commands.rb', line 11

def create_option_builder
  super.tap do |option_builder|
    products = dependencies.find { |r| r.name == :products }
    if products
      option_builder.builders << HammerCLIForeman::DependentSearchablesOptionBuilder.new(
        products, searchables)
    end
  end
end

#dependenciesObject



5
6
7
8
9
# File 'lib/hammer_cli_katello/associating_commands.rb', line 5

def dependencies
  dependency_resolver.resource_dependencies(associated_resource,
                                            :only_required => false,
                                            :recursive => true)
end