lib/jamf/api/classic/base_classes/group.rb in ruby-jss-3.0.0 vs lib/jamf/api/classic/base_classes/group.rb in ruby-jss-3.1.0b1
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright 2022 Pixar
+# Copyright 2023 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
@@ -349,11 +349,11 @@
clear unless preserve_members
end
# backward compatility
alias set_static make_static
-
+
# How many members of the group?
#
# @return [Integer] the number of members of the group
#
def size
@@ -437,11 +437,11 @@
# nothing to do if that id isn't one of our members
return unless id_to_remove && member_ids.include?(id_to_remove)
@members.delete_if { |k, v| k == :id && v == id_to_remove }
- @need_to_update = true
+ @need_to_update = true
end
# Remove all members
#
# @return [void]
@@ -480,12 +480,12 @@
# @return [Array<Hash>] the refresh membership
#
def refresh_members
@members = @cnx.c_get(@rest_rsrc)[self.class::RSRC_OBJECT_KEY][self.class::MEMBER_CLASS::RSRC_LIST_KEY]
end
-
+
# Public Instance Methods
#####################################
private
# Check that a potential group member is valid in the JSS.
@@ -498,10 +498,10 @@
desired_id = self.class::MEMBER_CLASS.valid_id m, cnx: @cnx
raise Jamf::NoSuchItemError, "No #{self.class::MEMBER_CLASS::RSRC_OBJECT_KEY} matching '#{m}' in the JSS." unless desired_id
desired_name = self.class::MEMBER_CLASS.map_all(:id, to: :name, cnx: @cnx)[desired_id]
- { name: desired_name, id: desired_id }
+ { name: desired_name, id: desired_id }
end
# the xml formated data for adding or updating this in the JSS,
#
def rest_xml