Sha256: ca6e3caa33c82aacd50298231bca046e7186b741899280548cc8c28bc5733987

Contents?: true

Size: 1.02 KB

Versions: 14

Compression:

Stored size: 1.02 KB

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 bibrenderer(options = {})
        ::Relaton::Render::BIPM::General.new(options.merge(language: @lang,
                                                           i18nhash: @i18n.get))
      end

      def omit_docid_prefix(prefix)
        %w(BIPM BIPM-long).include? prefix and return true
        super
      end

      def amd?(_text)
        false
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
metanorma-bipm-2.5.3 lib/isodoc/bipm/init.rb
metanorma-bipm-2.5.2 lib/isodoc/bipm/init.rb
metanorma-bipm-2.5.1 lib/isodoc/bipm/init.rb
metanorma-bipm-2.5.0 lib/isodoc/bipm/init.rb
metanorma-bipm-2.4.12 lib/isodoc/bipm/init.rb
metanorma-bipm-2.4.11 lib/isodoc/bipm/init.rb
metanorma-bipm-2.4.10 lib/isodoc/bipm/init.rb
metanorma-bipm-2.4.9 lib/isodoc/bipm/init.rb
metanorma-bipm-2.4.8 lib/isodoc/bipm/init.rb
metanorma-bipm-2.4.7 lib/isodoc/bipm/init.rb
metanorma-bipm-2.4.6 lib/isodoc/bipm/init.rb
metanorma-bipm-2.4.5 lib/isodoc/bipm/init.rb
metanorma-bipm-2.4.4 lib/isodoc/bipm/init.rb
metanorma-bipm-2.4.3 lib/isodoc/bipm/init.rb