Class: Metanorma::Csand::Processor
- Inherits:
-
Processor
- Object
- Processor
- Metanorma::Csand::Processor
- Defined in:
- lib/metanorma/csand/processor.rb
Instance Method Summary collapse
-
#initialize ⇒ Processor
constructor
A new instance of Processor.
- #input_to_isodoc(file) ⇒ Object
- #output(isodoc_node, outname, format, options = {}) ⇒ Object
- #output_formats ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize ⇒ Processor
Returns a new instance of Processor.
7 8 9 10 11 |
# File 'lib/metanorma/csand/processor.rb', line 7 def initialize @short = :csand @input_format = :asciidoc @asciidoctor_backend = :csand end |
Instance Method Details
#input_to_isodoc(file) ⇒ Object
23 24 25 |
# File 'lib/metanorma/csand/processor.rb', line 23 def input_to_isodoc(file) Metanorma::Input::Asciidoc.new.process(file, @asciidoctor_backend) end |
#output(isodoc_node, outname, format, options = {}) ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/metanorma/csand/processor.rb', line 27 def output(isodoc_node, outname, format, ={}) case format when :html IsoDoc::Csand::HtmlConvert.new().convert(outname, isodoc_node) else super end end |
#output_formats ⇒ Object
13 14 15 16 17 |
# File 'lib/metanorma/csand/processor.rb', line 13 def output_formats super.merge( html: "html" ) end |
#version ⇒ Object
19 20 21 |
# File 'lib/metanorma/csand/processor.rb', line 19 def version "Asciidoctor::Csand #{Asciidoctor::Csand::VERSION}" end |