Method: Jamf::OAPIObject.mutable?
- Defined in:
- lib/jamf/api/jamf_pro/base_classes/oapi_object.rb
.mutable? ⇒ Boolean
By default,OAPIObjects (as a whole) are mutable, although some attributes may not be (see OAPI_PROPERTIES in the JSONObject docs)
When an entire sublcass of OAPIObject is read-only/immutable, ‘extend Jamf::Immutable`, which will override this to return false. Doing so will prevent any setters from being created for the subclass and will cause Jamf::Resource.save to raise an error
50 51 52 |
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 50 def self.mutable? !singleton_class.ancestors.include? Jamf::Immutable end |