Sha256: 7e941a7612fc69767e3142982388c967ea1e54be80c898f23c8009d8e3bdfe58

Contents?: true

Size: 744 Bytes

Versions: 3

Compression:

Stored size: 744 Bytes

Contents

# frozen_string_literal: true

require_relative "base_mapper"

module LocMods
  class Genre < BaseMapper
    attribute :content, Shale::Type::String
    attribute :type, Shale::Type::String
    attribute :display_label, Shale::Type::String
    attribute :alt_rep_group, Shale::Type::String
    attribute :usage, Shale::Type::String
    attribute :authority, Shale::Type::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.4 lib/loc_mods/genre.rb
loc_mods-0.2.3 lib/loc_mods/genre.rb
loc_mods-0.2.2 lib/loc_mods/genre.rb