class Datacite::Mapping::FunderIdentifier
Public Class Methods
new(type:, value:, scheme_uri: nil)
click to toggle source
@param type [FunderIdentifierType] the identifier type. Cannot be nil. @param value [String] the identifier value. Cannot be nil.
# File lib/datacite/mapping/funding_reference.rb, line 30 def initialize(type:, value:, scheme_uri: nil) self.type = type self.scheme_uri = scheme_uri self.value = value end
Public Instance Methods
to_s()
click to toggle source
# File lib/datacite/mapping/funding_reference.rb, line 48 def to_s "#{type.value}: #{value}" end
type=(value)
click to toggle source
# File lib/datacite/mapping/funding_reference.rb, line 42 def type=(value) raise ArgumentError, 'Type cannot be nil' unless value @type = value end
value=(value)
click to toggle source
# File lib/datacite/mapping/funding_reference.rb, line 36 def value=(value) raise ArgumentError, 'Value cannot be empty or nil' unless value && !value.empty? @value = value end