Class: HtmlEmailCreator::Formatters::HtmlEmail

Inherits:
Formatter
  • Object
show all
Defined in:
lib/html_email_creator/formatters/html_email.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Formatter

#extension, #id

Constructor Details

#initialize(html, settings) ⇒ HtmlEmail

Returns a new instance of HtmlEmail.



14
15
16
17
# File 'lib/html_email_creator/formatters/html_email.rb', line 14

def initialize(html, settings)
  super
  @processor = HtmlEmailCreator::Processor.new(html, settings)
end

Class Method Details

.extensionObject



6
7
8
# File 'lib/html_email_creator/formatters/html_email.rb', line 6

def self.extension
  "html"
end

.idObject



10
11
12
# File 'lib/html_email_creator/formatters/html_email.rb', line 10

def self.id
  :html_email
end

Instance Method Details

#formatObject



19
20
21
# File 'lib/html_email_creator/formatters/html_email.rb', line 19

def format
  @output ||= @processor.to_html
end