Sha256: 4b1daefcd4556b001f9e8c2926a36cde245665a3f765523ccc0882d4b22f24fe

Contents?: true

Size: 618 Bytes

Versions: 6

Compression:

Stored size: 618 Bytes

Contents

module Relaton
  module Render
    module Ieee
      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",
             "Institute of Electrical and Electronics Engineers",
             "IEEE"].include?(r[:nonpersonal])
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
metanorma-ieee-1.3.8 lib/relaton/render/parse.rb
metanorma-ieee-1.3.7 lib/relaton/render/parse.rb
metanorma-ieee-1.3.6 lib/relaton/render/parse.rb
metanorma-ieee-1.3.4 lib/relaton/render/parse.rb
metanorma-ieee-1.3.3 lib/relaton/render/parse.rb
metanorma-ieee-1.3.2 lib/relaton/render/parse.rb