Module: RelatonIetf::BibXMLParser
- Extended by:
- BibXMLParser
- Includes:
- RelatonBib::BibXMLParser
- Included in:
- BibXMLParser
- Defined in:
- lib/relaton_ietf/bibxml_parser.rb
Instance Method Summary collapse
- #bib_item(**attrs) ⇒ RelatonIetf::IetfBibliographicItem
- #committee(wgr) ⇒ RelatonIetf::Committee
- #contributors(reference) ⇒ Array<Hash>
-
#pubid_type(id) ⇒ String
Extract document identifier type form identifier.
Instance Method Details
#bib_item(**attrs) ⇒ RelatonIetf::IetfBibliographicItem
8 9 10 11 12 13 14 |
# File 'lib/relaton_ietf/bibxml_parser.rb', line 8 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 |
#committee(wgr) ⇒ RelatonIetf::Committee
34 35 36 |
# File 'lib/relaton_ietf/bibxml_parser.rb', line 34 def committee(wgr) Committee.new wgr end |
#contributors(reference) ⇒ Array<Hash>
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/relaton_ietf/bibxml_parser.rb', line 40 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 |
#pubid_type(id) ⇒ String
Extract document identifier type form identifier
23 24 25 26 27 28 29 30 |
# File 'lib/relaton_ietf/bibxml_parser.rb', line 23 def pubid_type(id) type = super case type when "BCP", "FYI", "STD", "RFC" then "RFC" when "Internet-Draft" then type else "IETF" end end |