Class: EmlToPdf::Converter
- Inherits:
-
Object
- Object
- EmlToPdf::Converter
- Defined in:
- lib/eml_to_pdf/converter.rb
Instance Method Summary collapse
- #convert ⇒ Object
-
#initialize(input_path, output_path) ⇒ Converter
constructor
A new instance of Converter.
Constructor Details
#initialize(input_path, output_path) ⇒ Converter
Returns a new instance of Converter.
3 4 5 6 |
# File 'lib/eml_to_pdf/converter.rb', line 3 def initialize(input_path, output_path) @input_path = input_path @output_path = output_path end |
Instance Method Details
#convert ⇒ Object
8 9 10 11 12 |
# File 'lib/eml_to_pdf/converter.rb', line 8 def convert email = Email.new(@input_path) html = email.to_html Wkhtmltopdf.convert(html, @output_path) end |