Class: RelatonIetf::Renderer::BibXML
- Inherits:
-
RelatonBib::Renderer::BibXML
- Object
- RelatonBib::Renderer::BibXML
- RelatonIetf::Renderer::BibXML
- Defined in:
- lib/relaton_ietf/renderer/bibxml.rb
Instance Method Summary collapse
-
#render_authors(builder) ⇒ Object
Render authors as BibXML.
-
#render_date(builder) ⇒ Object
Render dates as BibXML.
Instance Method Details
#render_authors(builder) ⇒ Object
Render authors as BibXML. Override to skip “RFC Publisher” organization.
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/relaton_ietf/renderer/bibxml.rb', line 18 def (builder) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity @bib.contributor.each do |c| next if c.entity.is_a?(RelatonBib::Organization) && c.entity.name.map(&:content).include?("RFC Publisher") builder. do |xml| xml.parent[:role] = "editor" if c.role.detect { |r| r.type == "editor" } if c.entity.is_a?(RelatonBib::Person) then render_person xml, c.entity else render_organization xml, c.entity, c.role end render_address xml, c end end end |
#render_date(builder) ⇒ Object
Render dates as BibXML. Override to skip IANA date rendering.
9 10 11 |
# File 'lib/relaton_ietf/renderer/bibxml.rb', line 9 def render_date(builder) super unless @bib.docidentifier.detect { |i| i.type == "IANA" } end |