Class: ActiveCMIS::Relationship
- Defined in:
- lib/active_cmis/relationship.rb
Instance Attribute Summary
Attributes inherited from Object
#key, #repository, #updated_attributes
Instance Method Summary collapse
-
#delete ⇒ void
Remove the relationship.
-
#parent_folders ⇒ Array()
Return [], a relationship is not fileable.
- #source ⇒ Object
- #target ⇒ Object
- #update(updates = {}) ⇒ void
Methods inherited from Object
#acl, #allowable_actions, #attribute, attributes, #attributes, #destroy, #file, from_atom_entry, from_parameters, #id, #initialize, #inspect, key, #method_missing, #name, #reload, #save, #source_relations, #target_relations, #unfile
Methods included from Internal::Caching
Constructor Details
This class inherits a constructor from ActiveCMIS::Object
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveCMIS::Object
Instance Method Details
#delete ⇒ void
This method returns an undefined value.
Remove the relationship
17 18 19 |
# File 'lib/active_cmis/relationship.rb', line 17 def delete conn.delete(self_link) end |
#parent_folders ⇒ Array()
Return [], a relationship is not fileable
40 41 42 |
# File 'lib/active_cmis/relationship.rb', line 40 def parent_folders [] end |
#source ⇒ Object
4 5 6 |
# File 'lib/active_cmis/relationship.rb', line 4 def source Internal::Utils.string_or_id_to_object(repository, attribute("cmis:sourceId")) end |
#target ⇒ Object
10 11 12 |
# File 'lib/active_cmis/relationship.rb', line 10 def target Internal::Utils.string_or_id_to_object(repository, attribute("cmis:targetId")) end |
#update(updates = {}) ⇒ void
This method returns an undefined value.
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/active_cmis/relationship.rb', line 24 def update(updates = {}) super # Potentially necessary if repositories support it # Probably not though # Note: we use remove_instance_variable because of the way I implemented the caching if updates["cmis:sourceId"] && instance_variable_defined?("@source") remove_instance_variable "@source" end if updates["cmis:targetId"] && instance_variable_defined?("@target") remove_instance_variable "@target" end end |