class Datacite::Mapping::AlternateIdentifier
An identifier or identifiers other than the primary {Identifier} applied to the {Resource}.
Public Class Methods
new(type:, value:)
click to toggle source
Initializes a new {AlternateIdentifier} @param type [String] the identifier type @param value [String] the identifier value
# File lib/datacite/mapping/alternate_identifier.rb, line 16 def initialize(type:, value:) self.type = type self.value = value end
Public Instance Methods
type=(val)
click to toggle source
Sets the type. Cannot be nil. @param val [String] the identifier type
# 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)
click to toggle source
Sets the value. Cannot be nil. @param val [String] the value
# File lib/datacite/mapping/alternate_identifier.rb, line 31 def value=(val) raise ArgumentError, 'No identifier value provided' unless val @value = val end