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.
9 10 11 12 13 |
# File 'lib/metanorma/csa/processor.rb', line 9 def initialize @short = :csa @input_format = :asciidoc @asciidoctor_backend = :csa end |
Instance Method Details
#output(isodoc_node, inname, outname, format, options = {}) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/metanorma/csa/processor.rb', line 27 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
15 16 17 18 19 20 21 |
# File 'lib/metanorma/csa/processor.rb', line 15 def output_formats super.merge( html: 'html', doc: 'doc', pdf: 'pdf' ) end |