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.



72
73
74
75
# File 'lib/datacite/mapping/resource_type.rb', line 72

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

Instance Attribute Details

#resource_type_general ⇒ ResourceTypeGeneral

Returns the general resource type.

Returns:



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

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

#value ⇒ String

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

Returns:

  • (String) —

    additional free text description of the resource type. Optional.



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

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