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.



56
57
58
59
# File 'lib/datacite/mapping/funding_reference.rb', line 56

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



72
# File 'lib/datacite/mapping/funding_reference.rb', line 72

uri_node :uri, '@awardURI', default_value: nil

#valueString

Returns the award number. Cannot be nil.

Returns:

  • (String)

    the award number. Cannot be nil.



76
# File 'lib/datacite/mapping/funding_reference.rb', line 76

text_node :value, 'text()'

Instance Method Details

#to_s



66
67
68
# File 'lib/datacite/mapping/funding_reference.rb', line 66

def to_s
  "#{value} (#{uri})"
end