Sha256: 639aa82994211d0e81ba594e7885961a0d21540cbb673142e12ecd72dc287fd5

Contents?: true

Size: 663 Bytes

Versions: 3

Compression:

Stored size: 663 Bytes

Contents

# frozen_string_literal: true

require_relative "base_mapper"

module LocMods
  class LanguageTerm < BaseMapper
    attribute :content, Shale::Type::String
    attribute :authority_uri, Shale::Type::Value
    attribute :value_uri, Shale::Type::Value
    attribute :authority, Shale::Type::String
    attribute :type, Shale::Type::String

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

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