Method: Jamf::Group#initialize
- Defined in:
- lib/jamf/api/classic/base_classes/group.rb
#initialize(**args) ⇒ Group
When creating a new group in the JSS, you must call .make with a :type key and a value of :smart or :static, as well as a :name
209 210 211 212 213 214 215 216 217 218 |
# File 'lib/jamf/api/classic/base_classes/group.rb', line 209 def initialize(**args) raise Jamf::InvalidDataError, 'New group creation must specify a :type of :smart or :static' if args[:id] == :new && !(GROUP_TYPES.include? args[:type]) super @is_smart = @init_data[:is_smart] || (args[:type] == :smart) @members = @init_data[self.class::MEMBER_CLASS::RSRC_LIST_KEY] || [] end |