Sha256: b1b1b367004ba2ca7726fb3591824b245ff55a600b9f3f47de6b9a6a697717e3
Contents?: true
Size: 818 Bytes
Versions: 8
Compression:
Stored size: 818 Bytes
Contents
# frozen_string_literal: true module RelatonIso # Hit. class Hit < RelatonBib::Hit # @return [RelatonIso::HitCollection] attr_reader :hit_collection # Parse page. # @return [RelatonIso::IsoBibliographicItem] def fetch @fetch ||= Scrapper.parse_page @hit end # @param builder [Nokogiri::XML::Builder] def to_xml(builder = nil, **opts) if builder fetch.to_xml builder, **opts else builder = Nokogiri::XML::Builder.new(encoding: "UTF-8") do |xml| fetch.to_xml xml, **opts end builder.doc.root.to_xml end end def sort_weight case hit["publicationStatus"] when "Published" then 0 when "Under development" then 1 when "Withdrawn" then 2 else 3 end end end end
Version data entries
8 entries across 8 versions & 1 rubygems