Class: Datacite::Mapping::FromCocina::AlternateIdentifiers
- Inherits:
-
Object
- Object
- Datacite::Mapping::FromCocina::AlternateIdentifiers
- Defined in:
- lib/datacite/mapping/from_cocina/alternate_identifiers.rb
Overview
Maps alternative identifiers from cocina description to DataCite JSON
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(description:) ⇒ AlternateIdentifiers
constructor
A new instance of AlternateIdentifiers.
Constructor Details
#initialize(description:) ⇒ AlternateIdentifiers
13 14 15 |
# File 'lib/datacite/mapping/from_cocina/alternate_identifiers.rb', line 13 def initialize(description:) @description = description end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
17 18 19 |
# File 'lib/datacite/mapping/from_cocina/alternate_identifiers.rb', line 17 def description @description end |
Class Method Details
.build ⇒ Object
9 10 11 |
# File 'lib/datacite/mapping/from_cocina/alternate_identifiers.rb', line 9 def self.build(...) new(...).call end |
Instance Method Details
#call ⇒ Object
21 22 23 24 25 26 |
# File 'lib/datacite/mapping/from_cocina/alternate_identifiers.rb', line 21 def call [{ alternateIdentifier: purl, alternateIdentifierType: 'PURL' }] end |