Sha256: 3427a73077937af2f7814747a2deea64bc43fd3ae08ec7f98ff18468eb1a1f4f
Contents?: true
Size: 851 Bytes
Versions: 14
Compression:
Stored size: 851 Bytes
Contents
module RelatonCalconnect class XMLParser < RelatonBib::XMLParser class << self # override RelatonBib::BibliographicItem.bib_item method # @param item_hash [Hash] # @return [RelatonIsoBib::IsoBibliographicItem] def bib_item(item_hash) CcBibliographicItem.new(**item_hash) end # @param ext [Nokogiri::XML::Element] # @return [RelatonBib::EditorialGroup, nil] def fetch_editorialgroup(ext) return unless ext && (eg = ext.at "editorialgroup") eg = eg.xpath("committee", "technical-committee").map do |tc| wg = RelatonBib::WorkGroup.new(name: tc.text, number: tc[:number]&.to_i, type: tc[:type]) TechnicalCommittee.new wg end RelatonBib::EditorialGroup.new eg if eg.any? end end end end
Version data entries
14 entries across 14 versions & 1 rubygems