Class: Datacite::Mapping::FromCocina::AlternateIdentifiers

Inherits:
Object
  • Object
show all
Defined in:
lib/datacite/mapping/from_cocina/alternate_identifiers.rb

Overview

Maps alternative identifiers from cocina description to DataCite JSON

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#descriptionObject (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

.buildObject



9
10
11
# File 'lib/datacite/mapping/from_cocina/alternate_identifiers.rb', line 9

def self.build(...)
  new(...).call
end

Instance Method Details

#callObject



21
22
23
24
25
26
# File 'lib/datacite/mapping/from_cocina/alternate_identifiers.rb', line 21

def call
  [{
    alternateIdentifier: purl,
    alternateIdentifierType: 'PURL'
  }]
end