Sha256: 629712e444dd25d2d949b89c9d22e6a35e66a58a57fd9ec52de312685759ecc6

Contents?: true

Size: 791 Bytes

Versions: 6

Compression:

Stored size: 791 Bytes

Contents

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

module IsoDoc
  module BIPM
    module Init
      def metadata_init(lang, script, locale, labels)
        @meta = Metadata.new(lang, script, locale, 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, locale, i18nyaml = nil)
        @i18n = I18n.new(lang, script, locale: locale,
                                       i18nyaml: i18nyaml || @i18nyaml)
      end

      def omit_docid_prefix(prefix)
        return true if %w(BIPM BIPM-long).include? prefix

        super
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
metanorma-bipm-2.3.0 lib/isodoc/bipm/init.rb
metanorma-bipm-2.2.14 lib/isodoc/bipm/init.rb
metanorma-bipm-2.2.13 lib/isodoc/bipm/init.rb
metanorma-bipm-2.2.12 lib/isodoc/bipm/init.rb
metanorma-bipm-2.2.11 lib/isodoc/bipm/init.rb
metanorma-bipm-2.2.10 lib/isodoc/bipm/init.rb