Class: Metanorma::M3AAWG::Processor

Inherits:
Processor
  • Object
show all
Defined in:
lib/metanorma/m3aawg/processor.rb

Instance Method Summary collapse

Constructor Details

#initializeProcessor

Returns a new instance of Processor.



15
16
17
18
19
# File 'lib/metanorma/m3aawg/processor.rb', line 15

def initialize
  @short = [:m3d, :m3aawg]
  @input_format = :asciidoc
  @asciidoctor_backend = :m3aawg
end

Instance Method Details

#output(isodoc_node, inname, outname, format, options = {}) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/metanorma/m3aawg/processor.rb', line 33

def output(isodoc_node, inname, outname, format, options={})
  case format
  when :html
    IsoDoc::M3AAWG::HtmlConvert.new(options).convert(inname, isodoc_node, nil, outname)
  when :doc
    IsoDoc::M3AAWG::WordConvert.new(options).convert(inname, isodoc_node, nil, outname)
  when :pdf
    IsoDoc::M3AAWG::WordConvert.new(options).convert(inname, isodoc_node, nil, outname)
  when :presentation
    IsoDoc::M3AAWG::PresentationXMLConvert.new(options).convert(inname, isodoc_node, nil, outname)
  else
    super
  end
end

#output_formatsObject



21
22
23
24
25
26
27
# File 'lib/metanorma/m3aawg/processor.rb', line 21

def output_formats
  super.merge(
    html: "html",
    doc: "doc",
    pdf: "pdf"
  )
end

#versionObject



29
30
31
# File 'lib/metanorma/m3aawg/processor.rb', line 29

def version
  "Metanorma::M3AAWG #{Metanorma::M3AAWG::VERSION}"
end