class HammerCLIKatello::ProductContentBase::ProductContentCommand
Public Class Methods
setup()
click to toggle source
# File lib/hammer_cli_katello/product_content.rb, line 4 def self.setup desc _("List associated products") command_name "product-content" output do from :content do field :id, _("Id") field :name, _("Name") field :type, _("Type") field :contentUrl, _("Url") field :gpgUrl, _("GPG Key") field :label, _("Label") end field :enabled, _("Default Enabled?"), Fields::Boolean field :override_description, _("Override") end build_options end
Public Instance Methods
extend_data(mod)
click to toggle source
# File lib/hammer_cli_katello/product_content.rb, line 23 def extend_data(mod) formatted_overrides = mod["overrides"].map do |override| value = override['value'] if override['name'] == "enabled" value = override['value'] ? '1' : '0' end "#{override['name']}:#{value}" end mod["override_description"] = formatted_overrides.join(", ") mod end