Sha256: 66189a621c9c63d6af652639a3102c23c98d6852cc0160a65ae510bab1f6d5ba

Contents?: true

Size: 748 Bytes

Versions: 16

Compression:

Stored size: 748 Bytes

Contents

require "isodoc"

module IsoDoc
  module IHO

    class Metadata < IsoDoc::Generic::Metadata
      def configuration
        Metanorma::IHO.configuration
      end

      def commentperiod(ixml, _out)
        from = ixml.at(ns("//bibdata/ext/commentperiod/from"))&.text
        to = ixml.at(ns("//bibdata/ext/commentperiod/to"))&.text
        extended = ixml.at(ns("//bibdata/ext/commentperiod/extended"))&.text
        set(:comment_from, from) if from
        set(:comment_to, to) if to
      end

      def series(xml, _out)
        set(:series, xml.at(ns("//bibdata/series[@type = 'main']/title"))&.text)
        a = xml.at(ns("//bibdata/series[@type = 'main']/abbreviation"))&.text and
          set(:seriesabbr, a)
      end
    end
  end
end

Version data entries

16 entries across 13 versions & 2 rubygems

Version Path
metanorma-iho-0.2.4 lib/isodoc/iho/metadata.rb
metanorma-iho-0.2.3 lib/isodoc/iho/metadata.rb
metanorma-iho-0.2.2 lib/isodoc/iho/metadata.rb
metanorma-iho-0.2.1 lib/isodoc/iho/metadata.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-iho-0.2.0/lib/isodoc/iho/metadata.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-iho-0.1.2/lib/isodoc/iho/metadata.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-iho-0.1.1/lib/isodoc/iho/metadata.rb
metanorma-iho-0.2.0 lib/isodoc/iho/metadata.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/metanorma-iho-0.1.1/lib/isodoc/iho/metadata.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/metanorma-iho-0.1.2/lib/isodoc/iho/metadata.rb
metanorma-iho-0.1.2 lib/isodoc/iho/metadata.rb
metanorma-iho-0.1.1 lib/isodoc/iho/metadata.rb
metanorma-iho-0.1.0 lib/isodoc/iho/metadata.rb
metanorma-iho-0.0.3 lib/isodoc/iho/metadata.rb
metanorma-iho-0.0.2 lib/isodoc/iho/metadata.rb
metanorma-iho-0.0.1 lib/isodoc/iho/metadata.rb