Class: Relaton::Render::Jis::Parse
- Inherits:
-
Iso::Parse
- Object
- Iso::Parse
- Relaton::Render::Jis::Parse
- Defined in:
- lib/relaton/render-jis/parse.rb
Instance Method Summary collapse
Instance Method Details
#home_standard(_doc, pubs) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/relaton/render-jis/parse.rb', line 16 def home_standard(_doc, pubs) pubs&.any? do |r| ["International Organization for Standardization", "ISO", "International Electrotechnical Commission", "IEC", "日本規格協会", "一般財団法人 日本規格協会", "Japanese Industrial Standards"] .include?(r[:nonpersonal]) end end |
#simple_or_host_xml2hash(doc, host) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/relaton/render-jis/parse.rb', line 7 def simple_or_host_xml2hash(doc, host) ret = super orgs = i(publisher_raw ) .each_with_object([]) do |i, m| ret[i] and m << ret[i] end ret.merge(home_standard: home_standard(doc, orgs.flatten)) end |