Class: Datacite::Mapping::ResourceType

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

Overview

The type of the resource

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource_type_general:, value: nil) ⇒ ResourceType

Parameters:

  • resource_type_general (ResourceTypeGeneral)

    the general resource type

  • value (String) (defaults to: nil)

    additional free text description of the resource type.



64
65
66
67
# File 'lib/datacite/mapping/resource_type.rb', line 64

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

Instance Attribute Details

#resource_type_generalResourceTypeGeneral

Returns the general resource type.

Returns:



79
# File 'lib/datacite/mapping/resource_type.rb', line 79

typesafe_enum_node :resource_type_general, '@resourceTypeGeneral', class: ResourceTypeGeneral

#valueString

Returns additional free text description of the resource type. Optional.

Returns:

  • (String)

    additional free text description of the resource type. Optional.



83
# File 'lib/datacite/mapping/resource_type.rb', line 83

text_node :value, 'text()', default_value: nil