Module: Jamf::DataDependency
- Included in:
- JComputerExtensionAttribute, JMobileDeviceExtensionAttribute
- Defined in:
- lib/jamf/api/jamf_pro/mixins/data_dependency.rb
Overview
This mixin implements the .../data-dependency endpoints that some collection resources have (and eventually all will??) It should be included into classes representing those resources
data-dependencies list other Jamf Pro objects that use the current object, e.g. Advanced Searches or Smart Groups that use an Extension Attribute in their criteria.
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- DATA_DEPENDENCY_ENDPOINT =
'data-dependency'.freeze
Class Method Summary collapse
-
.included(includer) ⇒ Object
when this module is included, also extend our Class Methods.
Instance Method Summary collapse
-
#data_dependency ⇒ Array<Hash>
Get the dependencies for the current object.
Class Method Details
.included(includer) ⇒ Object
when this module is included, also extend our Class Methods
23 24 25 26 |
# File 'lib/jamf/api/jamf_pro/mixins/data_dependency.rb', line 23 def self.included(includer) Jamf.load_msg "--> #{includer} is including Jamf::DataDependency" includer.extend(ClassMethods) end |
Instance Method Details
#data_dependency ⇒ Array<Hash>
Get the dependencies for the current object. This is a list of objects that use this object and would prevent if from being deleted
33 34 35 |
# File 'lib/jamf/api/jamf_pro/mixins/data_dependency.rb', line 33 def data_dependency self.class.data_dependency(id, cnx: @cnx) end |