Sha256: d7d8a7cb1ebb6da2ca1b8ed9cc7cb78645456bb57541067031ede2fd0ee52ff6

Contents?: true

Size: 1.01 KB

Versions: 12

Compression:

Stored size: 1.01 KB

Contents

require "metanorma/processor"

module Metanorma
  module Ribose
    class Processor < Metanorma::Generic::Processor
      def configuration
        Metanorma::Ribose.configuration
      end

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

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

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

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
metanorma-ribose-1.6.9 lib/metanorma/ribose/processor.rb
metanorma-ribose-1.6.8 lib/metanorma/ribose/processor.rb
metanorma-ribose-1.6.7 lib/metanorma/ribose/processor.rb
metanorma-ribose-1.6.6 lib/metanorma/ribose/processor.rb
metanorma-ribose-1.6.5 lib/metanorma/ribose/processor.rb
metanorma-ribose-1.6.4 lib/metanorma/ribose/processor.rb
metanorma-ribose-1.6.3 lib/metanorma/ribose/processor.rb
metanorma-ribose-1.6.2 lib/metanorma/ribose/processor.rb
metanorma-ribose-1.6.1 lib/metanorma/ribose/processor.rb
metanorma-ribose-1.6.0 lib/metanorma/ribose/processor.rb
metanorma-ribose-1.5.3 lib/metanorma/ribose/processor.rb
metanorma-ribose-1.5.2 lib/metanorma/ribose/processor.rb