Sha256: e6d6b192e196e1c9133cb4361a23d50d8074f6826b46c5dd8118fd1d61995ecf

Contents?: true

Size: 963 Bytes

Versions: 1

Compression:

Stored size: 963 Bytes

Contents

# frozen_string_literal: true

require "lutaml/model"

module LocMods
  class AccessCondition < Lutaml::Model::Serializable
    attribute :content, :string
    attribute :display_label, :string
    attribute :lang, :string
    attribute :script, :string
    attribute :transliteration, :string
    attribute :type, :string
    attribute :alt_rep_group, :string
    attribute :alt_format, :string
    attribute :content_type, :string

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

      map_content to: :content
      map_attribute "displayLabel", to: :display_label
      map_attribute "lang", to: :lang
      map_attribute "script", to: :script
      map_attribute "transliteration", to: :transliteration
      map_attribute "type", to: :type
      map_attribute "altRepGroup", to: :alt_rep_group
      map_attribute "altFormat", to: :alt_format
      map_attribute "contentType", to: :content_type
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
loc_mods-0.2.5 lib/loc_mods/access_condition.rb