Class: Datacite::Mapping::Publisher

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

Overview

The type of the resource

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, language: nil) ⇒ Publisher

Initializes a new Datacite::Mapping::Publisher

Parameters:

  • language (String, nil) (defaults to: nil)

    an IETF BCP 47, ISO 639-1 language code identifying the language.

  • value (String)

    name of the publisher



15
16
17
18
# File 'lib/datacite/mapping/publisher.rb', line 15

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

Instance Attribute Details

#languageString

Returns an IETF BCP 47, ISO 639-1 language code identifying the language.

Returns:

  • (String)

    an IETF BCP 47, ISO 639-1 language code identifying the language.



33
# File 'lib/datacite/mapping/publisher.rb', line 33

text_node :language, '@xml:lang', default_value: nil

#valueString

Returns the title itself.

Returns:

  • (String)

    the title itself.



37
# File 'lib/datacite/mapping/publisher.rb', line 37

text_node :value, 'text()'