Sha256: 5fbb22c85af0c4020dc3d7e3a00bd81116f415847826a2308b2c54a51dde7218

Contents?: true

Size: 681 Bytes

Versions: 3

Compression:

Stored size: 681 Bytes

Contents

# frozen_string_literal: true

require "lutaml/model"

module LocMods
  class Genre < Lutaml::Model::Serializable
    attribute :content, :string
    attribute :type, :string
    attribute :display_label, :string
    attribute :alt_rep_group, :string
    attribute :usage, :string
    attribute :authority, :string

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

      map_content to: :content
      map_attribute "type", to: :type
      map_attribute "displayLabel", to: :display_label
      map_attribute "altRepGroup", to: :alt_rep_group
      map_attribute "usage", to: :usage
      map_attribute "authority", to: :authority
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
loc_mods-0.2.7 lib/loc_mods/genre.rb
loc_mods-0.2.6 lib/loc_mods/genre.rb
loc_mods-0.2.5 lib/loc_mods/genre.rb