Class: Dor::WorkflowIndexer

Inherits:
Object
  • Object
show all
Includes:
SolrDocHelper
Defined in:
lib/dor/indexers/workflow_indexer.rb

Overview

Indexes the objects position in workflows

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SolrDocHelper

#add_solr_value

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

#resourceObject (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_solrHash

Returns the partial solr document for workflow concerns.

Returns:

  • (Hash)

    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