Sha256: 90e05e09ae5e4f462a018e19cee1a4070c24b6e4b753987ec563f8547805c16b
Contents?: true
Size: 1.25 KB
Versions: 24
Compression:
Stored size: 1.25 KB
Contents
module RelatonIetf module BibXMLParser include RelatonBib::BibXMLParser extend BibXMLParser # @param attrs [Hash] # @return [RelatonIetf::IetfBibliographicItem] def bib_item(**attrs) unless attrs.delete(:is_relation) attrs[:fetched] = Date.today.to_s # attrs[:place] = ["Fremont, CA"] end RelatonIetf::IetfBibliographicItem.new(**attrs) end # # Extract document identifier type form identifier # # @param [String] id identifier # # @return [String] type # def pubid_type(id) type = super case type when "BCP", "FYI", "STD", "RFC" then "RFC" when "Internet-Draft" then type else "IETF" end end # @param [RelatonBib::WorkGroup] # @return [RelatonIetf::Committee] def committee(wgr) Committee.new wgr end # @param reference [Nokogiri::XML::Element] # @return [Array<Hash>] def contributors(reference) contribs = [] unless reference[:anchor]&.match?(/^I-D/) contribs << { entity: new_org("Internet Engineering Task Force", "IETF"), role: [type: "publisher"], } end contribs + super # persons(reference) + organizations(reference) end end end
Version data entries
24 entries across 24 versions & 1 rubygems