Sha256: ee957da7607957a90db591a2774a3ea29c47bf3774bd005b44879b38baabee24

Contents?: true

Size: 1.03 KB

Versions: 6

Compression:

Stored size: 1.03 KB

Contents

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

module IsoDoc
  module Iec
    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)
        p = HtmlConvert.new(language: lang, script: script)
        @xrefs = Xref.new(lang, script, p, labels, options)
      end

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

      def bibrenderer
        ::Relaton::Render::Iec::General.new(options.merge(language: @lang,
                                            i18nhash: @i18n.get))
      end

      def convert1(docxml, filename, dir)
        id = docxml&.at(ns("//bibdata/docnumber"))&.text
        @is_iev = id == "60050"
        super
      end

      def std_docid_semantic(text)
        text
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
metanorma-iec-2.5.12 lib/isodoc/iec/init.rb
metanorma-iec-2.5.11 lib/isodoc/iec/init.rb
metanorma-iec-2.5.10 lib/isodoc/iec/init.rb
metanorma-iec-2.5.9 lib/isodoc/iec/init.rb
metanorma-iec-2.5.8 lib/isodoc/iec/init.rb
metanorma-iec-2.5.7 lib/isodoc/iec/init.rb