Sha256: a7e921dc1cb728bab58936bde385661a717ac5e6c84fc04d390dfb03d1f27644

Contents?: true

Size: 586 Bytes

Versions: 3

Compression:

Stored size: 586 Bytes

Contents

# frozen_string_literal: true

require_relative "base_mapper"

require_relative "date"

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

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

      map_content to: :content
      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/temporal.rb
loc_mods-0.2.3 lib/loc_mods/temporal.rb
loc_mods-0.2.2 lib/loc_mods/temporal.rb