class Metanorma::Processor

Attributes

asciidoctor_backend[R]
input_format[R]
short[R]

Public Class Methods

new() click to toggle source
# File lib/metanorma/processor.rb, line 8
def initialize
  raise "This is an abstract class!"
end

Public Instance Methods

extract_metanorma_options(file) click to toggle source
# File lib/metanorma/processor.rb, line 44
def extract_metanorma_options(file)
  Metanorma::Input::Asciidoc.new.extract_metanorma_options(file)
end
extract_options(file) click to toggle source
# File lib/metanorma/processor.rb, line 40
def extract_options(file)
  Metanorma::Input::Asciidoc.new.extract_options(file)
end
input_to_isodoc(file, filename, options = {}) click to toggle source
# File lib/metanorma/processor.rb, line 20
def input_to_isodoc(file, filename, options = {})
  Metanorma::Input::Asciidoc.new.process(file, filename, @asciidoctor_backend, options)
end
output(isodoc_node, _inname, outname, _format, _options = {}) click to toggle source
# File lib/metanorma/processor.rb, line 36
def output(isodoc_node, _inname, outname, _format, _options = {})
  File.open(outname, "w:UTF-8") { |f| f.write(isodoc_node) }
end
output_formats() click to toggle source
# File lib/metanorma/processor.rb, line 12
def output_formats
  {
    xml: "xml",
    presentation: "presentation.xml",
    rxl: "rxl",
  }
end
use_presentation_xml(ext) click to toggle source

def input_to_isodoc(file, filename)

raise "This is an abstract class!"

end

# File lib/metanorma/processor.rb, line 28
def use_presentation_xml(ext)
  case ext
  when :html, :doc, :pdf then true
  else
    false
  end
end