class Datacite::Mapping::ContributorName
Public Class Methods
new(value:, type: nil, language: nil)
click to toggle source
# File lib/datacite/mapping/contributor_name.rb, line 12 def initialize(value:, type: nil, language: nil) self.type = type self.language = language self.value = value end
Public Instance Methods
language=(value)
click to toggle source
# File lib/datacite/mapping/contributor_name.rb, line 18 def language=(value) @language = value&.strip end
value=(value)
click to toggle source
# File lib/datacite/mapping/contributor_name.rb, line 22 def value=(value) new_value = value&.strip raise ArgumentError, 'Value cannot be empty or nil' unless new_value && !new_value.empty? @value = new_value.strip end