Class: Metanorma::Cc::Processor
- Inherits:
-
Generic::Processor
- Object
- Generic::Processor
- Metanorma::Cc::Processor
- Defined in:
- lib/metanorma/cc/processor.rb
Instance Method Summary collapse
- #configuration ⇒ Object
-
#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.
10 11 12 13 14 |
# File 'lib/metanorma/cc/processor.rb', line 10 def initialize @short = [:csd, :cc] @input_format = :asciidoc @asciidoctor_backend = :cc end |
Instance Method Details
#configuration ⇒ Object
6 7 8 |
# File 'lib/metanorma/cc/processor.rb', line 6 def configuration Metanorma::Cc.configuration end |
#output(isodoc_node, inname, outname, format, options = {}) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/metanorma/cc/processor.rb', line 28 def output(isodoc_node, inname, outname, format, ={}) () case format when :html IsoDoc::Cc::HtmlConvert.new().convert(inname, isodoc_node, nil, outname) when :doc IsoDoc::Cc::WordConvert.new().convert(inname, isodoc_node, nil, outname) when :pdf IsoDoc::Cc::PdfConvert.new().convert(inname, isodoc_node, nil, outname) when :presentation IsoDoc::Cc::PresentationXMLConvert.new().convert(inname, isodoc_node, nil, outname) else super end end |
#output_formats ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/metanorma/cc/processor.rb', line 16 def output_formats super.merge( html: "html", pdf: "pdf", doc: "doc" ) end |