Class: Metanorma::Ogc::Processor
- Inherits:
-
Processor
- Object
- Processor
- Metanorma::Ogc::Processor
- Defined in:
- lib/metanorma/ogc/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
7 8 9 10 11 |
# File 'lib/metanorma/ogc/processor.rb', line 7 def initialize # rubocop:disable Lint/MissingSuper @short = :ogc @input_format = :asciidoc @asciidoctor_backend = :ogc end |
Instance Method Details
#fonts_manifest ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/metanorma/ogc/processor.rb', line 22 def fonts_manifest { "Lato" => nil, "Lato Light" => nil, "Arial" => nil, "STIX Two Math" => nil, "Source Han Sans" => nil, "Source Han Sans Normal" => nil, "Fira Code" => nil, "Courier New" => nil, "Times New Roman" => nil, "Overpass" => nil, "Space Mono" => nil, } end |
#output(isodoc_node, inname, outname, format, options = {}) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/metanorma/ogc/processor.rb', line 42 def output(isodoc_node, inname, outname, format, ={}) () case format when :html then IsoDoc::Ogc::HtmlConvert.new() .convert(inname, isodoc_node, nil, outname) when :doc then IsoDoc::Ogc::WordConvert.new() .convert(inname, isodoc_node, nil, outname) when :pdf then IsoDoc::Ogc::PdfConvert.new() .convert(inname, isodoc_node, nil, outname) when :presentation then IsoDoc::Ogc::PresentationXMLConvert.new() .convert(inname, isodoc_node, nil, outname) else super end end |
#output_formats ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/metanorma/ogc/processor.rb', line 13 def output_formats super.merge( html: "html", doc: "doc", pdf: "pdf", ) end |