Sha256: 56bff70941c4278a7a0133f0162257d84c254a40facc7dfbf65d540cee2c64b8

Contents?: true

Size: 578 Bytes

Versions: 3

Compression:

Stored size: 578 Bytes

Contents

# frozen_string_literal: true

require_relative "base_mapper"

module LocMods
  class Publisher < BaseMapper
    attribute :content, Shale::Type::String
    attribute :authority, Shale::Type::String
    attribute :authority_uri, Shale::Type::Value
    attribute :value_uri, Shale::Type::Value

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

      map_content to: :content
      map_attribute "authority", to: :authority
      map_attribute "authorityURI", to: :authority_uri
      map_attribute "valueURI", to: :value_uri
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
loc_mods-0.2.4 lib/loc_mods/publisher.rb
loc_mods-0.2.3 lib/loc_mods/publisher.rb
loc_mods-0.2.2 lib/loc_mods/publisher.rb