Sha256: 4edd8f639f36d56dbe5135ee71e9643e322d025785fcd67de78e074d04bde394

Contents?: true

Size: 545 Bytes

Versions: 35

Compression:

Stored size: 545 Bytes

Contents

module Relaton
  module Render
    module ISO
      class Parse < ::Relaton::Render::Parse
        def simple_or_host_xml2hash(doc, host)
          ret = super
          ret.merge(home_standard: home_standard(doc, ret[:publisher_raw]))
        end

        def home_standard(_doc, pubs)
          pubs&.any? do |r|
            ["International Organization for Standardization", "ISO",
             "International Electrotechnical Commission", "IEC"]
              .include?(r[:nonpersonal])
          end
        end
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
metanorma-iso-2.8.0 lib/relaton/render/parse.rb
metanorma-iso-2.7.10 lib/relaton/render/parse.rb
metanorma-iso-2.7.9 lib/relaton/render/parse.rb
metanorma-iso-2.7.8 lib/relaton/render/parse.rb
metanorma-iso-2.7.7 lib/relaton/render/parse.rb
metanorma-iso-2.7.6 lib/relaton/render/parse.rb
metanorma-iso-2.7.5 lib/relaton/render/parse.rb
metanorma-iso-2.7.4 lib/relaton/render/parse.rb
metanorma-iso-2.7.3 lib/relaton/render/parse.rb
metanorma-iso-2.7.2 lib/relaton/render/parse.rb
metanorma-iso-2.7.1 lib/relaton/render/parse.rb
metanorma-iso-2.7.0 lib/relaton/render/parse.rb
metanorma-iso-2.6.4 lib/relaton/render/parse.rb
metanorma-iso-2.6.2 lib/relaton/render/parse.rb
metanorma-iso-2.6.1 lib/relaton/render/parse.rb
metanorma-iso-2.6.0 lib/relaton/render/parse.rb
metanorma-iso-2.5.4 lib/relaton/render/parse.rb
metanorma-iso-2.5.3 lib/relaton/render/parse.rb
metanorma-iso-2.5.2 lib/relaton/render/parse.rb
metanorma-iso-2.5.1 lib/relaton/render/parse.rb