Class: Dbd::ProvenanceResource
- Defined in:
- lib/dbd/provenance_resource.rb
Overview
A ProvenanceResource is derived from a Resource, specifically for a Provenance.
The main difference is that it does not have a provenance_subject.
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#<<(provenance_fact) ⇒ Object
Add a ProvenanceFact (strictly only 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.
17 18 19 |
# File 'lib/dbd/provenance_resource.rb', line 17 def initialize( = {}) super end |
Instance Method Details
#<<(provenance_fact) ⇒ Object
Add a ProvenanceFact (strictly only a ProvenanceFact).
Side effect on subject:
- 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.
28 29 30 |
# File 'lib/dbd/provenance_resource.rb', line 28 def <<(provenance_fact) super end |