Class: Metanorma::Iho::Processor

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

Instance Method Summary collapse

Instance Method Details

#configurationObject



6
7
8
# File 'lib/metanorma/iho/processor.rb', line 6

def configuration
  Metanorma::Iho.configuration
end

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



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/metanorma/iho/processor.rb', line 22

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

#output_formatsObject



10
11
12
13
14
15
16
# File 'lib/metanorma/iho/processor.rb', line 10

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

#versionObject



18
19
20
# File 'lib/metanorma/iho/processor.rb', line 18

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