Sha256: e6f107536040494958f4613d62a953aa18a29f10cea5841cd492570deb2c8727
Contents?: true
Size: 1.25 KB
Versions: 1
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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
relaton-ietf-1.13.2 | lib/relaton_ietf/bibxml_parser.rb |