Sha256: 7eb80993b1e454aee7cd51e514cb707af604f37bdd04180462cec0e978f3e6f0

Contents?: true

Size: 780 Bytes

Versions: 3

Compression:

Stored size: 780 Bytes

Contents

# frozen_string_literal: true

require_relative "base_mapper"

module LocMods
  class TypeOfResource < BaseMapper
    attribute :content, Shale::Type::String
    attribute :collection, Shale::Type::Value
    attribute :manuscript, Shale::Type::Value
    attribute :display_label, Shale::Type::String
    attribute :alt_rep_group, Shale::Type::String
    attribute :usage, Shale::Type::Value

    xml do
      root "typeOfResource"
      namespace "http://www.loc.gov/mods/v3", nil

      map_content to: :content
      map_attribute "collection", to: :collection
      map_attribute "manuscript", to: :manuscript
      map_attribute "displayLabel", to: :display_label
      map_attribute "altRepGroup", to: :alt_rep_group
      map_attribute "usage", to: :usage
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
loc_mods-0.2.4 lib/loc_mods/type_of_resource.rb
loc_mods-0.2.3 lib/loc_mods/type_of_resource.rb
loc_mods-0.2.2 lib/loc_mods/type_of_resource.rb