Class: Relaton::Render::Bipm::Parse
- Inherits:
-
Parse
- Object
- Parse
- Relaton::Render::Bipm::Parse
- Defined in:
- lib/relaton/render/parse.rb
Instance Method Summary collapse
- #authoritative_identifier(doc) ⇒ Object
- #home_standard(_doc, pubs) ⇒ Object
- #simple_or_host_xml2hash(doc, host) ⇒ Object
Instance Method Details
#authoritative_identifier(doc) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/relaton/render/parse.rb', line 18 def (doc) if %w(article journal book).include?(doc.type) [] # we don't want BIPM identifiers for these! else super end end |
#home_standard(_doc, pubs) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/relaton/render/parse.rb', line 10 def home_standard(_doc, pubs) pubs&.any? do |r| ["International Organization for Standardization", "ISO", "International Electrotechnical Commission", "IEC"] .include?(r[:nonpersonal]) end end |
#simple_or_host_xml2hash(doc, host) ⇒ Object
5 6 7 8 |
# File 'lib/relaton/render/parse.rb', line 5 def simple_or_host_xml2hash(doc, host) ret = super ret.merge(home_standard: home_standard(doc, ret[:publisher_raw])) end |