Sha256: acf145df171ed3da6fc9d3c374f78e5ba1a2fc2bfc16243d7967102d385d82e6

Contents?: true

Size: 571 Bytes

Versions: 25

Compression:

Stored size: 571 Bytes

Contents

require "nokogiri"

module RelatonBsi
  class XMLParser < RelatonIsoBib::XMLParser
    class << self
      private

      # Override RelatonBib::XMLParser.item_data method.
      # @param isoitem [Nokogiri::XML::Element]
      # @returtn [Hash]
      def item_data(isoitem)
        data = super
        ext = isoitem.at "./ext"
        return data unless ext

        data
      end

      # @param item_hash [Hash]
      # @return [RelatonBsi::BsiBibliographicItem]
      def bib_item(item_hash)
        BsiBibliographicItem.new(**item_hash)
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
relaton-bsi-1.18.0 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.17.0 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.16.2 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.16.1 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.16.0 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.14.6 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.14.5 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.14.4 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.14.3 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.14.2 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.14.1 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.14.0 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.13.0 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.12.0 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.11.1 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.11.0 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.10.2 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.10.1 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.10.0 lib/relaton_bsi/xml_parser.rb
relaton-bsi-1.9.5 lib/relaton_bsi/xml_parser.rb