Class: Metanorma::NIST::Processor
- Inherits:
-
Processor
- Object
- Processor
- Metanorma::NIST::Processor
- Defined in:
- lib/metanorma/nist/processor.rb
Instance Method Summary collapse
- #fonts_manifest ⇒ 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.
6 7 8 9 10 |
# File 'lib/metanorma/nist/processor.rb', line 6 def initialize @short = :nist @input_format = :asciidoc @asciidoctor_backend = :nist end |
Instance Method Details
#fonts_manifest ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/metanorma/nist/processor.rb', line 20 def fonts_manifest { "Arial" => nil, "Calibri" => nil, "Cambria" => nil, "Courier" => nil, "Courier New" => nil, "STIX Two Math" => nil, "Times New Roman" => nil, } end |
#output(isodoc_node, inname, outname, format, options = {}) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/metanorma/nist/processor.rb', line 36 def output(isodoc_node, inname, outname, format, ={}) case format when :html IsoDoc::NIST::HtmlConvert.new().convert(inname, isodoc_node, nil, outname) when :doc IsoDoc::NIST::WordConvert.new().convert(inname, isodoc_node, nil, outname) when :pdf IsoDoc::NIST::PdfConvert.new().convert(inname, isodoc_node, nil, outname) when :presentation IsoDoc::NIST::PresentationXMLConvert.new().convert(inname, isodoc_node, nil, outname) else super end end |
#output_formats ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/metanorma/nist/processor.rb', line 12 def output_formats super.merge( html: "html", doc: "doc", pdf: "pdf" ) end |
#version ⇒ Object
32 33 34 |
# File 'lib/metanorma/nist/processor.rb', line 32 def version "Metanorma::NIST #{Metanorma::NIST::VERSION}" end |