Class: Metanorma::Csa::Processor
- Inherits:
-
Processor
- Object
- Processor
- Metanorma::Csa::Processor
- Defined in:
- lib/metanorma/csa/processor.rb
Instance Method Summary collapse
-
#initialize ⇒ Processor
constructor
A new instance of Processor.
- #output(isodoc_node, inname, outname, format, options = {}) ⇒ Object
- #output_formats ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize ⇒ Processor
Returns a new instance of Processor.
8 9 10 11 12 |
# File 'lib/metanorma/csa/processor.rb', line 8 def initialize @short = :csa @input_format = :asciidoc @asciidoctor_backend = :csa end |
Instance Method Details
#output(isodoc_node, inname, outname, format, options = {}) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/metanorma/csa/processor.rb', line 26 def output(isodoc_node, inname, outname, format, = {}) () case format when :html IsoDoc::Csa::HtmlConvert.new() .convert(inname, isodoc_node, nil, outname) when :doc IsoDoc::Csa::WordConvert.new() .convert(inname, isodoc_node, nil, outname) when :pdf IsoDoc::Csa::PdfConvert.new() .convert(inname, isodoc_node, nil, outname) when :presentation IsoDoc::Csa::PresentationXMLConvert.new() .convert(inname, isodoc_node, nil, outname) else super end end |
#output_formats ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/metanorma/csa/processor.rb', line 14 def output_formats super.merge( html: "html", doc: "doc", pdf: "pdf", ) end |