class RelatonCalconnect::XMLParser
Public Class Methods
bib_item(item_hash)
click to toggle source
override RelatonBib::BibliographicItem.bib_item method @param item_hash [Hash] @return [RelatonIsoBib::IsoBibliographicItem]
# File lib/relaton_calconnect/xml_parser.rb, line 7 def bib_item(item_hash) CcBibliographicItem.new(**item_hash) end
fetch_editorialgroup(ext)
click to toggle source
@param ext [Nokogiri::XML::Element] @return [RelatonBib::EditorialGroup, nil]
# File lib/relaton_calconnect/xml_parser.rb, line 13 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