Class: Curate::Indexer::Documents::IndexDocument Private
- Inherits:
-
Object
- Object
- Curate::Indexer::Documents::IndexDocument
- Defined in:
- lib/curate/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 rudimentary representation of what is needed to reindex Solr documents
Instance Attribute Summary collapse
- #ancestors ⇒ Object readonly private
- #parent_pids ⇒ Object readonly private
- #pathnames ⇒ Object readonly private
- #pid ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(keywords = {}) ⇒ IndexDocument
constructor
private
A new instance of IndexDocument.
- #sorted_ancestors ⇒ Object private
- #sorted_parent_pids ⇒ Object private
- #sorted_pathnames ⇒ Object private
Constructor Details
#initialize(keywords = {}) ⇒ IndexDocument
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 IndexDocument.
25 26 27 28 29 30 |
# File 'lib/curate/indexer/documents.rb', line 25 def initialize(keywords = {}) @pid = keywords.fetch(:pid).to_s @parent_pids = Array(keywords.fetch(:parent_pids)) @pathnames = Array(keywords.fetch(:pathnames)) @ancestors = Array(keywords.fetch(:ancestors)) end |
Instance Attribute Details
#ancestors ⇒ 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.
31 32 33 |
# File 'lib/curate/indexer/documents.rb', line 31 def ancestors @ancestors end |
#parent_pids ⇒ 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.
31 32 33 |
# File 'lib/curate/indexer/documents.rb', line 31 def parent_pids @parent_pids end |
#pathnames ⇒ 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.
31 32 33 |
# File 'lib/curate/indexer/documents.rb', line 31 def pathnames @pathnames end |
#pid ⇒ 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.
31 32 33 |
# File 'lib/curate/indexer/documents.rb', line 31 def pid @pid end |
Instance Method Details
#sorted_ancestors ⇒ Object
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.
41 42 43 |
# File 'lib/curate/indexer/documents.rb', line 41 def sorted_ancestors ancestors.sort end |
#sorted_parent_pids ⇒ Object
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.
33 34 35 |
# File 'lib/curate/indexer/documents.rb', line 33 def sorted_parent_pids parent_pids.sort end |
#sorted_pathnames ⇒ Object
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.
37 38 39 |
# File 'lib/curate/indexer/documents.rb', line 37 def sorted_pathnames pathnames.sort end |