lib/relaton_ietf/bibxml_parser.rb in relaton-ietf-1.9.13 vs lib/relaton_ietf/bibxml_parser.rb in relaton-ietf-1.10.0
- old
+ new
@@ -1,19 +1,32 @@
module RelatonIetf
module BibXMLParser
include RelatonBib::BibXMLParser
extend BibXMLParser
- FLAVOR = "IETF".freeze
-
# @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"
+ else "IETF"
+ end
end
# @param [RelatonBib::WorkGroup]
# @return [RelatonIetf::Committee]
def committee(wgr)