Class: Metanorma::Standoc::Processor
- Inherits:
-
Processor
- Object
- Processor
- Metanorma::Standoc::Processor
- Defined in:
- lib/metanorma/standoc/processor.rb
Class Attribute Summary collapse
-
.asciidoctor_backend ⇒ Object
readonly
Returns the value of attribute asciidoctor_backend.
Instance Method Summary collapse
- #html_path(file) ⇒ 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
10 11 12 13 14 |
# File 'lib/metanorma/standoc/processor.rb', line 10 def initialize # rubocop:disable Lint/MissingSuper @short = :standoc @input_format = :asciidoc @asciidoctor_backend = :standoc end |
Class Attribute Details
.asciidoctor_backend ⇒ Object (readonly)
Returns the value of attribute asciidoctor_backend.
7 8 9 |
# File 'lib/metanorma/standoc/processor.rb', line 7 def asciidoctor_backend @asciidoctor_backend end |
Instance Method Details
#html_path(file) ⇒ Object
29 30 31 32 |
# File 'lib/metanorma/standoc/processor.rb', line 29 def html_path(file) File.join(File.dirname(__FILE__), "..", "..", "isodoc", "html", file) end |
#output(isodoc_node, inname, outname, format, options = {}) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/metanorma/standoc/processor.rb', line 34 def output(isodoc_node, inname, outname, format, = {}) () case format when :html = .merge(htmlstylesheet: html_path("htmlstyle.scss"), htmlcoverpage: html_path("html_titlepage.html")) IsoDoc::HtmlConvert.new() .convert(inname, isodoc_node, nil, outname) when :doc IsoDoc::WordConvert.new() .convert(inname, isodoc_node, nil, outname) when :pdf IsoDoc::Standoc::PdfConvert.new() .convert(inname, isodoc_node, nil, outname) when :presentation IsoDoc::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/standoc/processor.rb', line 16 def output_formats super.merge( html: "html", doc: "doc", pdf: "pdf", ) end |