Sha256: 30d0f067712e0268391ee7e230103a3702e11d00a9b73b1ed1a62306d12ebebd

Contents?: true

Size: 697 Bytes

Versions: 1

Compression:

Stored size: 697 Bytes

Contents

# frozen_string_literal: true

require "lutaml/model"

module LocMods
  class Identifier < Lutaml::Model::Serializable
    attribute :content, :string
    attribute :display_label, :string
    attribute :type, :string
    attribute :type_uri, :string
    attribute :invalid, :string
    attribute :alt_rep_group, :string

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

      map_content to: :content
      map_attribute "displayLabel", to: :display_label
      map_attribute "type", to: :type
      map_attribute "typeURI", to: :type_uri
      map_attribute "invalid", to: :invalid
      map_attribute "altRepGroup", to: :alt_rep_group
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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