Class: Relaton::Render::Iec::Parse

Inherits:
Parse
  • Object
show all
Defined in:
lib/relaton/render-iec/parse.rb

Instance Method Summary collapse

Instance Method Details

#home_standard(_doc, pubs) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/relaton/render-iec/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-iec/parse.rb', line 5

def simple_or_host_xml2hash(doc, host)
  ret = super
  ret.merge(home_standard: home_standard(doc, ret[:publisher_raw]))
end