Class: Datacite::Mapping::ContributorName
- Inherits:
-
Object
- Object
- Datacite::Mapping::ContributorName
- Includes:
- XML::Mapping
- Defined in:
- lib/datacite/mapping/contributor_name.rb
Instance Attribute Summary collapse
-
#language ⇒ String?
An IETF BCP 47, ISO 639-1 language code identifying the language.
-
#type ⇒ NameType?
The name type.
-
#value ⇒ String
The name itself.
Instance Method Summary collapse
-
#initialize(value:, type: nil, language: nil) ⇒ ContributorName
constructor
A new instance of ContributorName.
Constructor Details
#initialize(value:, type: nil, language: nil) ⇒ ContributorName
Returns a new instance of ContributorName.
12 13 14 15 16 |
# 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 |
Instance Attribute Details
#language ⇒ String?
Returns an IETF BCP 47, ISO 639-1 language code identifying the language.
35 |
# File 'lib/datacite/mapping/contributor_name.rb', line 35 text_node :language, '@xml:lang', default_value: nil |
#type ⇒ NameType?
Returns the name type. Optional.
31 |
# File 'lib/datacite/mapping/contributor_name.rb', line 31 typesafe_enum_node :type, '@nameType', class: NameType, default_value: nil |
#value ⇒ String
Returns the name itself.
39 |
# File 'lib/datacite/mapping/contributor_name.rb', line 39 text_node :value, 'text()' |