Sha256: 3712b5c95766e9a6a3c28917c433cf8364887f7cfb9d9bf663a0e051cf5514ca

Contents?: true

Size: 825 Bytes

Versions: 5

Compression:

Stored size: 825 Bytes

Contents

require "isodoc"
require_relative "metadata"
require_relative "xref"

module IsoDoc
  module IHO
    module Init
      def metadata_init(lang, script, labels)
        @meta = Metadata.new(lang, script, labels)
      end

      def xref_init(lang, script, _klass, labels, options)
        html = HtmlConvert.new(language: lang, script: script)
        @xrefs = Xref.new(lang, script, html, labels, options)
      end

      def i18n_init(lang, script, i18nyaml = nil)
        @i18n = I18n.new(
          lang, script, i18nyaml: i18nyaml ||
          Metanorma::IHO.configuration.i18nyaml || @i18nyaml
        )
      end

      def info(isoxml, out)
        @meta.series isoxml, out
        super
      end

      def omit_docid_prefix(prefix)
        return true if prefix == "IHO"

        super
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
metanorma-iho-0.6.8.1 lib/isodoc/iho/init.rb
metanorma-iho-0.6.8 lib/isodoc/iho/init.rb
metanorma-iho-0.6.7 lib/isodoc/iho/init.rb
metanorma-iho-0.6.6 lib/isodoc/iho/init.rb
metanorma-iho-0.6.5 lib/isodoc/iho/init.rb