Class: Metanorma::Iec::Processor
- Inherits:
-
Processor
- Object
- Processor
- Metanorma::Iec::Processor
- Defined in:
- lib/metanorma/iec/processor.rb
Instance Method Summary collapse
- #fonts_manifest ⇒ Object
-
#initialize ⇒ Processor
constructor
rubocop:disable Lint/MissingSuper.
- #output(isodoc_node, inname, outname, format, options = {}) ⇒ Object
- #output_formats ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize ⇒ Processor
rubocop:disable Lint/MissingSuper
6 7 8 9 10 |
# File 'lib/metanorma/iec/processor.rb', line 6 def initialize # rubocop:disable Lint/MissingSuper @short = :iec @input_format = :asciidoc @asciidoctor_backend = :iec end |
Instance Method Details
#fonts_manifest ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/metanorma/iec/processor.rb', line 21 def fonts_manifest { "Arial" => nil, "Times New Roman" => nil, "STIX Two Math" => nil, "Source Han Sans" => nil, "Source Han Sans Normal" => nil, "Courier New" => nil, } end |
#output(isodoc_node, inname, outname, format, options = {}) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/metanorma/iec/processor.rb', line 36 def output(isodoc_node, inname, outname, format, = {}) () case format when :html IsoDoc::Iec::HtmlConvert.new().convert(inname, isodoc_node, nil, outname) when :doc IsoDoc::Iec::WordConvert.new().convert(inname, isodoc_node, nil, outname) when :pdf IsoDoc::Iec::PdfConvert.new().convert(inname, isodoc_node, nil, outname) when :sts IsoDoc::Iso::StsConvert.new().convert(inname, isodoc_node, nil, outname) when :presentation IsoDoc::Iec::PresentationXMLConvert.new() .convert(inname, isodoc_node, nil, outname) else super end end |
#output_formats ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/metanorma/iec/processor.rb', line 12 def output_formats super.merge( html: "html", doc: "doc", pdf: "pdf", sts: "sts.xml", ) end |