# File lib/hammer_cli_foreman/commands.rb, line 496 def self.command_name(name=nil) name = super(name) || (associated_resource ? "remove-"+associated_resource.singular_name : nil) name.respond_to?(:gsub) ? name.gsub('_', '-') : name end
# File lib/hammer_cli_foreman/commands.rb, line 501 def self.desc(desc=nil) description = super(desc) || '' description.strip.empty? ? _("Disassociate a resource") : description end
# File lib/hammer_cli_foreman/commands.rb, line 514 def self.failure_message(msg = nil) super(msg) || default_message(_('Could not disassociate the %{resource_name}.')) end
# File lib/hammer_cli_foreman/commands.rb, line 518 def self.success_message(msg = nil) super(msg) || default_message(_('The %{resource_name} has been disassociated.')) end
# File lib/hammer_cli_foreman/commands.rb, line 506 def get_new_ids ids = get_current_ids.map(&:to_s) required_id = get_associated_identifier.to_s ids = ids.delete_if { |id| id == required_id } ids end