Class: Metanorma::Iso::Sts::Transformer::Standard
- Inherits:
-
Object
- Object
- Metanorma::Iso::Sts::Transformer::Standard
- Defined in:
- lib/metanorma/iso/sts/transformer/standard.rb
Overview
Adapter conforming the STS transformer to the metanorma-core
document_transformers contract: .new(model, options) plus
#transform returning a target (+::Sts::IsoSts::Standard+) that
responds to #to_xml. It hides the Context construction behind
the (model, options) signature, so the metanorma-core driver treats
STS exactly like any other document-model transformer.
Instance Method Summary collapse
-
#initialize(model, options = {}) ⇒ Standard
constructor
A new instance of Standard.
-
#transform ⇒ ::Sts::IsoSts::Standard
The STS output model, which responds to
#to_xml.
Constructor Details
#initialize(model, options = {}) ⇒ Standard
Returns a new instance of Standard.
19 20 21 22 |
# File 'lib/metanorma/iso/sts/transformer/standard.rb', line 19 def initialize(model, = {}) @model = model @options = end |
Instance Method Details
#transform ⇒ ::Sts::IsoSts::Standard
Returns the STS output model, which
responds to #to_xml.
26 27 28 |
# File 'lib/metanorma/iso/sts/transformer/standard.rb', line 26 def transform Transformer.transform(@model) end |