module HammerCLIKatello::Repository::AnsibleCollectionRequirementsHelper

Public Class Methods

included(base) click to toggle source
# File lib/hammer_cli_katello/repository.rb, line 6
def self.included(base)
  base.option "--ansible-collection-requirements-file",
              "REQUIREMENTS_FILE", _("Location of the ansible collections "\
                                   "requirements.yml file. "),
              :attribute_name => :option_ansible_collection_requirements_file,
              :required => false
end

Public Instance Methods

request_params() click to toggle source
Calls superclass method
# File lib/hammer_cli_katello/repository.rb, line 14
def request_params
  super.tap do |opts|
    requirements_file = option_ansible_collection_requirements_file
    if requirements_file
      opts["ansible_collection_requirements"] = File.read(requirements_file)
    end
  end
end