Class: DorIndexing::WorkflowFields
- Inherits:
-
Object
- Object
- DorIndexing::WorkflowFields
- Defined in:
- lib/dor_indexing/workflow_fields.rb
Overview
Model for workflow fields
Instance Attribute Summary collapse
-
#druid ⇒ Object
readonly
Returns the value of attribute druid.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
-
#workflow_client ⇒ Object
readonly
Returns the value of attribute workflow_client.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(druid:, version:, workflow_client:) ⇒ WorkflowFields
constructor
A new instance of WorkflowFields.
-
#result ⇒ Hash
The partial solr document for processable concerns.
Constructor Details
#initialize(druid:, version:, workflow_client:) ⇒ WorkflowFields
Returns a new instance of WorkflowFields.
12 13 14 15 16 |
# File 'lib/dor_indexing/workflow_fields.rb', line 12 def initialize(druid:, version:, workflow_client:) @druid = druid @version = version @workflow_client = workflow_client end |
Instance Attribute Details
#druid ⇒ Object (readonly)
Returns the value of attribute druid.
10 11 12 |
# File 'lib/dor_indexing/workflow_fields.rb', line 10 def druid @druid end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
10 11 12 |
# File 'lib/dor_indexing/workflow_fields.rb', line 10 def version @version end |
#workflow_client ⇒ Object (readonly)
Returns the value of attribute workflow_client.
10 11 12 |
# File 'lib/dor_indexing/workflow_fields.rb', line 10 def workflow_client @workflow_client end |
Class Method Details
.for(druid:, version:, workflow_client:) ⇒ Object
6 7 8 |
# File 'lib/dor_indexing/workflow_fields.rb', line 6 def self.for(druid:, version:, workflow_client:) new(druid:, version:, workflow_client:).result end |
Instance Method Details
#result ⇒ Hash
Returns the partial solr document for processable concerns.
19 20 21 22 23 24 |
# File 'lib/dor_indexing/workflow_fields.rb', line 19 def result {}.tap do |solr_doc| add_sortable_milestones(solr_doc) add_status(solr_doc) end end |