Class: YACCL::Model::Policy
Instance Attribute Summary collapse
-
#policy_text ⇒ Object
readonly
Returns the value of attribute policy_text.
Attributes inherited from Object
#base_type_id, #change_token, #created_by, #creation_date, #description, #last_modification_date, #last_modified_by, #name, #object_id, #object_type_id, #properties, #repository_id, #secondary_object_type_ids
Instance Method Summary collapse
- #apply_to(object) ⇒ Object
-
#initialize(repository_id, raw = {}) ⇒ Policy
constructor
A new instance of Policy.
- #remove_from(object) ⇒ Object
Methods inherited from Object
#acls, #add_aces, #allowable_actions, #delete, #object_type, #parents, #policies, #relationships, #remove_aces, #repository, #unfile, #update_properties
Constructor Details
#initialize(repository_id, raw = {}) ⇒ Policy
Returns a new instance of Policy.
6 7 8 9 |
# File 'lib/yaccl/model/policy.rb', line 6 def initialize(repository_id, raw={}) super @policy_text = @properties[:'cmis:policyText'] end |
Instance Attribute Details
#policy_text ⇒ Object (readonly)
Returns the value of attribute policy_text.
4 5 6 |
# File 'lib/yaccl/model/policy.rb', line 4 def policy_text @policy_text end |
Instance Method Details
#apply_to(object) ⇒ Object
11 12 13 |
# File 'lib/yaccl/model/policy.rb', line 11 def apply_to(object) Services.apply_policy(repository_id, object_id, object.object_id) end |
#remove_from(object) ⇒ Object
15 16 17 |
# File 'lib/yaccl/model/policy.rb', line 15 def remove_from(object) Services.remove_policy(repository_id, object_id, object.object_id) end |