Sha256: 7de4f315a55bb781fd11388e48433cc021895b0ea905b308da358028e42dc09e

Contents?: true

Size: 745 Bytes

Versions: 3

Compression:

Stored size: 745 Bytes

Contents

# frozen_string_literal: true

require_relative "base_mapper"

module LocMods
  class Url < BaseMapper
    attribute :content, Shale::Type::Value
    attribute :date_last_accessed, Shale::Type::String
    attribute :display_label, Shale::Type::String
    attribute :note, Shale::Type::String
    attribute :access, Shale::Type::String
    attribute :usage, Shale::Type::String

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

      map_content to: :content
      map_attribute "dateLastAccessed", to: :date_last_accessed
      map_attribute "displayLabel", to: :display_label
      map_attribute "note", to: :note
      map_attribute "access", to: :access
      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/url.rb
loc_mods-0.2.3 lib/loc_mods/url.rb
loc_mods-0.2.2 lib/loc_mods/url.rb