Class: EmlToPdf::Email
- Inherits:
-
Object
- Object
- EmlToPdf::Email
- Defined in:
- lib/eml_to_pdf/email.rb
Constant Summary collapse
- TEMPLATES_PATH =
Pathname.new(File.(__dir__)) + 'templates'
Instance Method Summary collapse
-
#initialize(email_provider) ⇒ Email
constructor
A new instance of Email.
- #to_html ⇒ Object
Constructor Details
#initialize(email_provider) ⇒ Email
Returns a new instance of Email.
9 10 11 |
# File 'lib/eml_to_pdf/email.rb', line 9 def initialize(email_provider) @mail = email_provider.email end |
Instance Method Details
#to_html ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/eml_to_pdf/email.rb', line 13 def to_html extraction = ExtractionStep.new(@mail) extraction = extraction.next until extraction.finished? html = extraction.to_html html = (html, @mail.all_parts) html = disable_links(html) unless links_enabled? html = (@mail, html) if html end |