Class: DorIndexing::Builders::OrcidBuilder
- Inherits:
-
Object
- Object
- DorIndexing::Builders::OrcidBuilder
- Defined in:
- lib/dor_indexing/builders/orcid_builder.rb
Overview
Helper methods for working with Orcid in Cocina
Class Method Summary collapse
-
.build(contributors) ⇒ String
The list of contributor ORCIDs to index into solr.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(contributors) ⇒ OrcidBuilder
constructor
A new instance of OrcidBuilder.
Constructor Details
#initialize(contributors) ⇒ OrcidBuilder
Returns a new instance of OrcidBuilder.
18 19 20 |
# File 'lib/dor_indexing/builders/orcid_builder.rb', line 18 def initialize(contributors) @contributors = Array(contributors) end |
Class Method Details
.build(contributors) ⇒ String
Returns the list of contributor ORCIDs to index into solr.
14 15 16 |
# File 'lib/dor_indexing/builders/orcid_builder.rb', line 14 def self.build(contributors) new(contributors).build end |
Instance Method Details
#build ⇒ Object
22 23 24 |
# File 'lib/dor_indexing/builders/orcid_builder.rb', line 22 def build cited_contributors.filter_map { |contributor| orcidid(contributor) } end |