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
14 15 16 17 |
# File 'lib/datacite/mapping/alternate_identifier.rb', line 14 def initialize(type:, value:) self.type = type self.value = value end |
Instance Method Details
#type=(val)
Sets the type. Cannot be nil.
21 22 23 24 |
# File 'lib/datacite/mapping/alternate_identifier.rb', line 21 def type=(val) fail ArgumentError, 'No identifier type provided' unless val @type = val end |
#value=(val)
Sets the value. Cannot be nil.
28 29 30 31 |
# File 'lib/datacite/mapping/alternate_identifier.rb', line 28 def value=(val) fail ArgumentError, 'No identifier value provided' unless val @value = val end |