Class: Dor::WorkflowIndexer
- Inherits:
-
Object
- Object
- Dor::WorkflowIndexer
- Includes:
- SolrDocHelper
- Defined in:
- lib/dor/indexers/workflow_indexer.rb
Overview
Indexes the objects position in workflows
Instance Attribute Summary collapse
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
-
#initialize(resource:) ⇒ WorkflowIndexer
constructor
A new instance of WorkflowIndexer.
-
#to_solr ⇒ Hash
The partial solr document for workflow concerns.
Methods included from SolrDocHelper
Constructor Details
#initialize(resource:) ⇒ WorkflowIndexer
Returns a new instance of WorkflowIndexer.
9 10 11 |
# File 'lib/dor/indexers/workflow_indexer.rb', line 9 def initialize(resource:) @resource = resource end |
Instance Attribute Details
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
8 9 10 |
# File 'lib/dor/indexers/workflow_indexer.rb', line 8 def resource @resource end |
Instance Method Details
#to_solr ⇒ Hash
Returns the partial solr document for workflow concerns.
14 15 16 17 18 |
# File 'lib/dor/indexers/workflow_indexer.rb', line 14 def to_solr {}.tap do |solr_doc| workflows.each { |wf| solr_doc = wf.to_solr(solr_doc) } end end |