Class: Datacite::Mapping::AlternateIdentifier
- Inherits:
-
Object
- Object
- Datacite::Mapping::AlternateIdentifier
- Includes:
- XML::Mapping
- Defined in:
- lib/datacite/mapping/alternate_identifier.rb
Overview
An identifier or identifiers other than the primary Identifier applied to the Resource.
Instance Method Summary collapse
-
#initialize(type:, value:) ⇒ AlternateIdentifier
constructor
Initializes a new AlternateIdentifier.
-
#type=(val)
Sets the type.
-
#value=(val)
Sets the value.
Constructor Details
#initialize(type:, value:) ⇒ AlternateIdentifier
Initializes a new Datacite::Mapping::AlternateIdentifier
16 17 18 19 |
# File 'lib/datacite/mapping/alternate_identifier.rb', line 16 def initialize(type:, value:) self.type = type self.value = value end |
Instance Method Details
#type=(val)
Sets the type. Cannot be nil.
23 24 25 26 27 |
# File 'lib/datacite/mapping/alternate_identifier.rb', line 23 def type=(val) raise ArgumentError, 'No identifier type provided' unless val @type = val end |
#value=(val)
Sets the value. Cannot be nil.
31 32 33 34 35 |
# File 'lib/datacite/mapping/alternate_identifier.rb', line 31 def value=(val) raise ArgumentError, 'No identifier value provided' unless val @value = val end |