Sha256: 0b6281aca31f74c0e355a6300952c2b21ec7fb266e892cc8b389401546c78318

Contents?: true

Size: 424 Bytes

Versions: 3

Compression:

Stored size: 424 Bytes

Contents

module Exlibris
  module Aleph
    require 'marc'
    class Metadata
      attr_reader :marc_xml

      def initialize(marc_xml)
        @marc_xml = marc_xml.strip
      end

      def marc_record
        @marc_record ||= marc_xml_reader.first
      end

      private
      def string_io
        StringIO.new(marc_xml)
      end

      def marc_xml_reader
        MARC::XMLReader.new(string_io)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
exlibris-aleph-2.0.4 lib/exlibris/aleph/metadata.rb
exlibris-aleph-2.0.3 lib/exlibris/aleph/metadata.rb
exlibris-aleph-2.0.0 lib/exlibris/aleph/metadata.rb