Class: Samvera::NestingIndexer::Documents::PreservationDocument Private
- Inherits:
-
Object
- Object
- Samvera::NestingIndexer::Documents::PreservationDocument
- Defined in:
- lib/samvera/nesting_indexer/documents.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A simplified document that reflects the necessary attributes for re-indexing the children of Fedora objects.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
private
String The Fedora object’s PID.
-
#parent_ids ⇒ Object
readonly
private
All of the direct parents of the Fedora document associated with the given PID.
Instance Method Summary collapse
-
#initialize(keywords = {}) ⇒ PreservationDocument
constructor
private
A new instance of PreservationDocument.
Constructor Details
#initialize(keywords = {}) ⇒ PreservationDocument
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of PreservationDocument.
14 15 16 17 |
# File 'lib/samvera/nesting_indexer/documents.rb', line 14 def initialize(keywords = {}) @id = keywords.fetch(:id).to_s @parent_ids = Array(keywords.fetch(:parent_ids)) end |
Instance Attribute Details
#id ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns String The Fedora object’s PID.
21 22 23 |
# File 'lib/samvera/nesting_indexer/documents.rb', line 21 def id @id end |
#parent_ids ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
All of the direct parents of the Fedora document associated with the given PID.
This does not include grandparents, great-grandparents, etc.
29 30 31 |
# File 'lib/samvera/nesting_indexer/documents.rb', line 29 def parent_ids @parent_ids end |