Class: Datacite::Mapping::FunderIdentifier
- Inherits:
-
Object
- Object
- Datacite::Mapping::FunderIdentifier
- Includes:
- XML::Mapping
- Defined in:
- lib/datacite/mapping/funding_reference.rb
Instance Attribute Summary collapse
-
#type ⇒ FunderIdentifierType
The identifier type.
-
#value ⇒ String
The identifier value.
Instance Method Summary collapse
-
#initialize(type:, value:) ⇒ FunderIdentifier
constructor
A new instance of FunderIdentifier.
- #to_s
Constructor Details
#initialize(type:, value:) ⇒ FunderIdentifier
Returns a new instance of FunderIdentifier.
27 28 29 30 |
# File 'lib/datacite/mapping/funding_reference.rb', line 27 def initialize(type:, value:) self.type = type self.value = value end |
Instance Attribute Details
#type ⇒ FunderIdentifierType
Returns the identifier type. Cannot be nil.
48 |
# File 'lib/datacite/mapping/funding_reference.rb', line 48 typesafe_enum_node :type, '@funderIdentifierType', class: FunderIdentifierType |
#value ⇒ String
Returns the identifier value. Cannot be nil.
52 |
# File 'lib/datacite/mapping/funding_reference.rb', line 52 text_node :value, 'text()' |
Instance Method Details
#to_s
42 43 44 |
# File 'lib/datacite/mapping/funding_reference.rb', line 42 def to_s "#{type.value}: #{value}" end |