Class: Dbd::ProvenanceResource
- Defined in:
- lib/dbd/provenance_resource.rb
Overview
A ProvenanceResource is derived from a Resource, specifically for a Provenance (does not have and does need a provenance_subject)
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#<<(provenance_fact) ⇒ Object
Add a ProvenanceFact.
-
#initialize(options = {}) ⇒ ProvenanceResource
constructor
Build a new ProvenanceResource.
Methods inherited from Resource
Methods included from Helpers::OrderedSetCollection
add_and_return_index, #each, #last, #size
Constructor Details
#initialize(options = {}) ⇒ ProvenanceResource
Build a new ProvenanceResource.
The subject can be either given as an argument or a new (random) subject is automatically set (see Resource for details).
A provenance_subject may not be given here.
15 16 17 |
# File 'lib/dbd/provenance_resource.rb', line 15 def initialize( = {}) super end |
Instance Method Details
#<<(provenance_fact) ⇒ Object
Add a ProvenanceFact.
- if it has no subject, the subject is set in a duplicate provenance_fact
- if is has the same subject as the resource, added unchanged.
- if it has a different subject, a SubjectError is raised.
25 26 27 28 |
# File 'lib/dbd/provenance_resource.rb', line 25 def <<(provenance_fact) # TODO: check the type of the provenance_fact (ProvenanceFact) super end |