Class: Metanorma::Rfc::ProcessorV3
- Inherits:
-
Processor
- Object
- Processor
- Metanorma::Rfc::ProcessorV3
- Defined in:
- lib/metanorma/rfc/processor_v3.rb
Instance Method Summary collapse
-
#initialize ⇒ ProcessorV3
constructor
A new instance of ProcessorV3.
- #input_to_isodoc(file) ⇒ Object
- #output(isodoc_node, outname, format, options = {}) ⇒ Object
- #output_formats ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize ⇒ ProcessorV3
Returns a new instance of ProcessorV3.
7 8 9 10 11 |
# File 'lib/metanorma/rfc/processor_v3.rb', line 7 def initialize @short = :rfc3 @input_format = :asciidoc @asciidoctor_backend = :rfc3 end |
Instance Method Details
#input_to_isodoc(file) ⇒ Object
23 24 25 |
# File 'lib/metanorma/rfc/processor_v3.rb', line 23 def input_to_isodoc(file) Metanorma::Input::Asciidoc.new.process(file, filename, @asciidoctor_backend) end |
#output(isodoc_node, outname, format, options = {}) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/metanorma/rfc/processor_v3.rb', line 27 def output(isodoc_node, outname, format, ={}) case format when :xmlrfc File.open(outname, 'w') { |file| file << isodoc_node } end end |
#output_formats ⇒ Object
13 14 15 16 17 |
# File 'lib/metanorma/rfc/processor_v3.rb', line 13 def output_formats { xmlrfc: "v3.xml" } end |
#version ⇒ Object
19 20 21 |
# File 'lib/metanorma/rfc/processor_v3.rb', line 19 def version "Asciidoctor::Rfc3 #{Asciidoctor::RFC::VERSION}" end |