lib/jss/api_object/scopable/scope.rb
# Remove a single item as a target for this scope.
#
# @param key[Symbol] the key from #{SCOPING_CLASSES} for the kind of item being removed, :computer, :building, etc...
#
# @param item[String,integer] a valid identifier of the item being removed
#
# @example
#   remove_target(:computer, "mantis")
#
# @return [void]
#
Remove a single item as a target for this scope.
Remove a single item as a target for this scope .
def remove_target(key, item)
        key = pluralize_key(key)
        item_id = validate_item :target, key, item, error_if_not_found: false
        return unless item_id
        return unless @targets[key]&.include?(item_id)
        @targets[key].delete item_id
        @container&.should_update
      end
def remove_target ( key , item ) key = pluralize_key ( key ) item_id = validate_item :target , key , item , error_if_not_found : false return unless item_id return unless @targets [ key ] &. include? ( item_id ) @targets [ key ] . delete item_id @container &. should_update end
Remove a single item as a target for this scope.
Remove a single item as a target for this scope .
None
void
key
the key from #{SCOPING_CLASSES} for the kind of item being removed, :computer, :building, etc
the key from # { SCOPING_CLASSES } for the kind of item being removed : computer : building etc
item
a valid identifier of the item being removed
a valid identifier of the item being removed
example
None