Sha256: 3dea3e2d862d5d7cff696f99dd8eb178a68fd5c1a25df4eeba6586c8b6f9488c

Contents?: true

Size: 383 Bytes

Versions: 6

Compression:

Stored size: 383 Bytes

Contents

module GeoWorks
  module Extractors
    module ModsHelper
      NS = {
        'xmlns:mods' => 'http://www.loc.gov/mods/v3'
      }.freeze
      def extract_mods_metadata(doc)
        {
          title: [doc.at_xpath('//mods:mods/mods:titleInfo/mods:title', NS).text],
          description: [doc.at_xpath('//mods:mods/mods:abstract', NS).text]
        }
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geo_works-0.2.0 app/models/concerns/geo_works/extractors/mods_helper.rb
geo_works-0.1.4 app/models/concerns/geo_works/extractors/mods_helper.rb
geo_works-0.1.3 app/models/concerns/geo_works/extractors/mods_helper.rb
geo_works-0.1.2 app/models/concerns/geo_works/extractors/mods_helper.rb
geo_works-0.1.1 app/models/concerns/geo_works/extractors/mods_helper.rb
geo_works-0.1.0 app/models/concerns/geo_works/extractors/mods_helper.rb