Class: Datacite::Mapping::AwardNumber

Inherits:
Object
  • Object
show all
Includes:
XML::Mapping
Defined in:
lib/datacite/mapping/funding_reference.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri: nil, value:) ⇒ AwardNumber

Returns a new instance of AwardNumber.



68
69
70
71
# File 'lib/datacite/mapping/funding_reference.rb', line 68

def initialize(uri: nil, value:)
  self.uri = uri
  self.value = value
end

Instance Attribute Details

#uriURI?

Returns The URI leading to a page provided by the funder for more information about the award.

Returns:

  • (URI, nil)

    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

#valueString

Returns the award number. Cannot be nil.

Returns:

  • (String)

    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