Sha256: 8e911094d8854c73d7284bdfb513fb6a575b4f7b14019ff44eae96ffd79072cd

Contents?: true

Size: 750 Bytes

Versions: 3

Compression:

Stored size: 750 Bytes

Contents

# frozen_string_literal: true

require_relative "base_mapper"

module LocMods
  class HierarchicalPart < BaseMapper
    attribute :content, Shale::Type::String
    attribute :level, Shale::Type::Value
    attribute :period, Shale::Type::Value
    attribute :authority, Shale::Type::String
    attribute :authority_uri, Shale::Type::Value
    attribute :value_uri, Shale::Type::Value

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

      map_content to: :content
      map_attribute "level", to: :level
      map_attribute "period", to: :period
      map_attribute "authority", to: :authority
      map_attribute "authorityURI", to: :authority_uri
      map_attribute "valueURI", to: :value_uri
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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