Class: Datacite::Mapping::Creator
- Inherits:
-
Object
- Object
- Datacite::Mapping::Creator
- Includes:
- XML::Mapping
- Defined in:
- lib/datacite/mapping/creator.rb
Overview
The main researchers involved working on the data, or the authors of the publication in priority order.
Instance Attribute Summary collapse
-
#affiliations ⇒ Array<String>?
The creator's affiliations.
-
#identifier ⇒ NameIdentifier?
An identifier for the creator.
-
#name ⇒ String
The personal name of the creator, in the format
Family, Given.
Instance Method Summary collapse
-
#initialize(name:, identifier: nil, affiliations: []) ⇒ Creator
constructor
Initializes a new Creator.
Constructor Details
#initialize(name:, identifier: nil, affiliations: []) ⇒ Creator
Initializes a new Datacite::Mapping::Creator.
14 15 16 17 18 |
# File 'lib/datacite/mapping/creator.rb', line 14 def initialize(name:, identifier: nil, affiliations: []) self.name = name self.identifier = identifier self.affiliations = affiliations end |
Instance Attribute Details
#affiliations ⇒ Array<String>?
Returns The creator's affiliations. Defaults to an empty list.
39 |
# File 'lib/datacite/mapping/creator.rb', line 39 array_node :affiliations, 'affiliation', class: String, default_value: [] |
#identifier ⇒ NameIdentifier?
Returns An identifier for the creator. Optional.
35 |
# File 'lib/datacite/mapping/creator.rb', line 35 object_node :identifier, 'nameIdentifier', class: NameIdentifier, default_value: nil |
#name ⇒ String
Returns The personal name of the creator, in the format Family, Given. Cannot be empty or nil.
31 |
# File 'lib/datacite/mapping/creator.rb', line 31 text_node :name, 'creatorName' |