class Metanorma::Mpfd::Processor
Public Class Methods
new()
click to toggle source
# File lib/metanorma/mpfd/processor.rb, line 7 def initialize @short = :mpfd @input_format = :asciidoc @asciidoctor_backend = :mpfd end
Public Instance Methods
input_to_isodoc(file)
click to toggle source
# File lib/metanorma/mpfd/processor.rb, line 25 def input_to_isodoc(file) Metanorma::Input::Asciidoc.new.process(file, @asciidoctor_backend) end
output(isodoc_node, outname, format, options={})
click to toggle source
Calls superclass method
# File lib/metanorma/mpfd/processor.rb, line 29 def output(isodoc_node, outname, format, options={}) case format when :html IsoDoc::Mpfd::HtmlConvert.new(options).convert(outname, isodoc_node) when :doc IsoDoc::Mpfd::WordConvert.new(options).convert(outname, isodoc_node) when :pdf IsoDoc::Mpfd::PdfConvert.new(options).convert(outname, isodoc_node) else super end end
output_formats()
click to toggle source
Calls superclass method
# File lib/metanorma/mpfd/processor.rb, line 13 def output_formats super.merge( html: "html", doc: "doc", pdf: "pdf" ) end
version()
click to toggle source
# File lib/metanorma/mpfd/processor.rb, line 21 def version "Asciidoctor::Mpfd #{Asciidoctor::Mpfd::VERSION}" end