Sha256: b93884e43b0679f0af61241e29155ca7733cb18f2f3275b405292d713dfdec6b

Contents?: true

Size: 705 Bytes

Versions: 5

Compression:

Stored size: 705 Bytes

Contents

# encoding: utf-8

require_relative 'base'

require 'libis/format/tool/email_to_pdf'
require 'libis/format/type_database'
require 'rexml/document'

module Libis
  module Format
    module Converter

      class EmailConverter < Libis::Format::Converter::Base

        def self.input_types
          [ :MSG ]
        end

        def self.output_types(format = nil)
          return [] unless input_types.include?(format)
          [ :PDF ]
        end

        def email_convert(_)
          #force usage of this converter
        end

        def convert(source, target, format, opts = {})
          super

          Format::Tool::EmailToPdf.run(source, target)
        end

      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
libis-format-1.2.3 lib/libis/format/converter/email_converter.rb
libis-format-1.2.2 lib/libis/format/converter/email_converter.rb
libis-format-1.2.1 lib/libis/format/converter/email_converter.rb
libis-format-1.2.0 lib/libis/format/converter/email_converter.rb
libis-format-1.1.0 lib/libis/format/converter/email_converter.rb