Sha256: e54b9d3789603bc90d4b54b8652507b03c9a7200b2fe9faee690a63f9be0b6b3

Contents?: true

Size: 621 Bytes

Versions: 1

Compression:

Stored size: 621 Bytes

Contents

# frozen_string_literal: true

require "lutaml/model"

module LocMods
  class Detail < Lutaml::Model::Serializable
    attribute :type, :string
    attribute :level, :integer
    attribute :number, :string, collection: true
    attribute :caption, :string, collection: true
    attribute :title, :string, collection: true

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

      map_attribute "type", to: :type
      map_attribute "level", to: :level
      map_element "number", to: :number
      map_element "caption", to: :caption
      map_element "title", to: :title
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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