Class: Datacite::Mapping::FromCocina::Identifiers
- Inherits:
-
Object
- Object
- Datacite::Mapping::FromCocina::Identifiers
- Defined in:
- lib/datacite/mapping/from_cocina/identifiers.rb
Overview
Transform the Cocina::Models::Identification to the DataCite identifier attributes
Instance Attribute Summary collapse
-
#identification ⇒ Object
readonly
Returns the value of attribute identification.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(identification:) ⇒ Identifiers
constructor
A new instance of Identifiers.
Constructor Details
#initialize(identification:) ⇒ Identifiers
Returns a new instance of Identifiers.
13 14 15 |
# File 'lib/datacite/mapping/from_cocina/identifiers.rb', line 13 def initialize(identification:) @identification = identification end |
Instance Attribute Details
#identification ⇒ Object (readonly)
Returns the value of attribute identification.
17 18 19 |
# File 'lib/datacite/mapping/from_cocina/identifiers.rb', line 17 def identification @identification end |
Class Method Details
.build ⇒ Object
9 10 11 |
# File 'lib/datacite/mapping/from_cocina/identifiers.rb', line 9 def self.build(...) new(...).call end |
Instance Method Details
#call ⇒ Object
19 20 21 22 23 24 |
# File 'lib/datacite/mapping/from_cocina/identifiers.rb', line 19 def call [{ identifier: identification.doi, identifierType: 'DOI' }] end |