Class: Datacite::Mapping::AwardNumber
- Inherits:
-
Object
- Object
- Datacite::Mapping::AwardNumber
- Includes:
- XML::Mapping
- Defined in:
- lib/datacite/mapping/funding_reference.rb
Instance Attribute Summary collapse
-
#uri ⇒ URI?
The URI leading to a page provided by the funder for more information about the award.
-
#value ⇒ String
The award number.
Instance Method Summary collapse
-
#initialize(value:, uri: nil) ⇒ AwardNumber
constructor
A new instance of AwardNumber.
- #to_s
Constructor Details
#initialize(value:, uri: nil) ⇒ AwardNumber
Returns a new instance of AwardNumber.
68 69 70 71 |
# File 'lib/datacite/mapping/funding_reference.rb', line 68 def initialize(value:, uri: nil) self.uri = uri self.value = value end |
Instance Attribute Details
#uri ⇒ URI?
Returns The URI leading to a page provided by the funder for more information about the award.
85 |
# File 'lib/datacite/mapping/funding_reference.rb', line 85 uri_node :uri, '@awardURI', default_value: nil |
#value ⇒ String
Returns the award number. Cannot be nil.
89 |
# File 'lib/datacite/mapping/funding_reference.rb', line 89 text_node :value, 'text()' |
Instance Method Details
#to_s
79 80 81 |
# File 'lib/datacite/mapping/funding_reference.rb', line 79 def to_s "#{value} (#{uri})" end |