Sha256: 72f4008e3de2704dccf300969b569b24aef4f06772295d26be5932c7143cbaab

Contents?: true

Size: 683 Bytes

Versions: 15

Compression:

Stored size: 683 Bytes

Contents

module RelatonCen
  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[:price_code] = ext.at("./price-code")&.text
      #   data[:cen_processing] = ext.at("./cen-processing")&.text
      #   data
      # end

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
relaton-cen-1.19.0 lib/relaton_cen/xml_parser.rb
relaton-cen-1.18.1 lib/relaton_cen/xml_parser.rb
relaton-cen-1.18.0 lib/relaton_cen/xml_parser.rb
relaton-cen-1.17.0 lib/relaton_cen/xml_parser.rb
relaton-cen-1.16.8 lib/relaton_cen/xml_parser.rb
relaton-cen-1.16.7 lib/relaton_cen/xml_parser.rb
relaton-cen-1.16.6 lib/relaton_cen/xml_parser.rb
relaton-cen-1.16.5 lib/relaton_cen/xml_parser.rb
relaton-cen-1.16.4 lib/relaton_cen/xml_parser.rb
relaton-cen-1.16.3 lib/relaton_cen/xml_parser.rb
relaton-cen-1.16.2 lib/relaton_cen/xml_parser.rb
relaton-cen-1.16.1 lib/relaton_cen/xml_parser.rb
relaton-cen-1.16.0 lib/relaton_cen/xml_parser.rb
relaton-cen-1.14.1 lib/relaton_cen/xml_parser.rb
relaton-cen-1.14.0 lib/relaton_cen/xml_parser.rb