Module: Metanorma::Iso::Sts

Defined in:
lib/metanorma/iso/sts.rb,
lib/metanorma/iso/sts/transformer.rb,
lib/metanorma/iso/sts/transformer/base.rb,
lib/metanorma/iso/sts/transformer/context.rb,
lib/metanorma/iso/sts/transformer/standard.rb,
lib/metanorma/iso/sts/transformer/content_text.rb,
lib/metanorma/iso/sts/transformer/id_generator.rb,
lib/metanorma/iso/sts/transformer/nbsp_processor.rb,
lib/metanorma/iso/sts/transformer/back_transformer.rb,
lib/metanorma/iso/sts/transformer/block_dispatcher.rb,
lib/metanorma/iso/sts/transformer/body_transformer.rb,
lib/metanorma/iso/sts/transformer/list_transformer.rb,
lib/metanorma/iso/sts/transformer/note_transformer.rb,
lib/metanorma/iso/sts/transformer/term_transformer.rb,
lib/metanorma/iso/sts/transformer/front_transformer.rb,
lib/metanorma/iso/sts/transformer/quote_transformer.rb,
lib/metanorma/iso/sts/transformer/table_transformer.rb,
lib/metanorma/iso/sts/transformer/figure_transformer.rb,
lib/metanorma/iso/sts/transformer/footnote_collector.rb,
lib/metanorma/iso/sts/transformer/inline_transformer.rb,
lib/metanorma/iso/sts/transformer/example_transformer.rb,
lib/metanorma/iso/sts/transformer/formula_transformer.rb,
lib/metanorma/iso/sts/transformer/section_transformer.rb,
lib/metanorma/iso/sts/transformer/def_list_transformer.rb,
lib/metanorma/iso/sts/transformer/document_transformer.rb,
lib/metanorma/iso/sts/transformer/iso_meta_transformer.rb,
lib/metanorma/iso/sts/transformer/paragraph_transformer.rb,
lib/metanorma/iso/sts/transformer/reference_transformer.rb,
lib/metanorma/iso/sts/transformer/sourcecode_transformer.rb

Overview

Native metanorma-document ISO-STS transformer (the :isosts output format).

QA GATE: this path is OFF by default. mnconvert (+IsoDoc::Iso::IsoStsConvert+) remains the :isosts default until the ISO-STS transformer QA is signed off; only then is the default flipped. Enable for testing / after sign-off with METANORMA_ISO_NATIVE_STS=1 or Metanorma::Iso::Sts.enabled = true.

NISO :sts has no metanorma-document transformer and always stays on mnconvert; this gate governs :isosts only.

Defined Under Namespace

Modules: Transformer

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.enabled=(value) ⇒ Object (writeonly)

Explicit override (true/false). When nil, falls back to the METANORMA_ISO_NATIVE_STS environment variable.



26
27
28
# File 'lib/metanorma/iso/sts.rb', line 26

def enabled=(value)
  @enabled = value
end

Class Method Details

.enabled?Boolean

Returns whether the native ISO-STS transformer is enabled. Defaults to false (mnconvert).

Returns:

  • (Boolean)

    whether the native ISO-STS transformer is enabled. Defaults to false (mnconvert).



30
31
32
33
34
# File 'lib/metanorma/iso/sts.rb', line 30

def enabled?
  return @enabled unless @enabled.nil?

  ENV["METANORMA_ISO_NATIVE_STS"] == "1"
end