Class: HtmlEmailCreator::Formatters::Formatter
- Inherits:
-
Object
- Object
- HtmlEmailCreator::Formatters::Formatter
show all
- Defined in:
- lib/html_email_creator/formatters/formatter.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(text, settings) ⇒ Formatter
Returns a new instance of Formatter.
12
13
14
15
|
# File 'lib/html_email_creator/formatters/formatter.rb', line 12
def initialize(text, settings)
@text = text
@settings = settings
end
|
Class Method Details
.extension ⇒ Object
8
9
10
|
# File 'lib/html_email_creator/formatters/formatter.rb', line 8
def self.extension
raise "extension needs to be defined"
end
|
.id ⇒ Object
4
5
6
|
# File 'lib/html_email_creator/formatters/formatter.rb', line 4
def self.id
raise "id needs to be defined"
end
|
Instance Method Details
#extension ⇒ Object
26
27
28
|
# File 'lib/html_email_creator/formatters/formatter.rb', line 26
def extension
self.class.extension
end
|
override to implement a correct formatter
18
19
20
|
# File 'lib/html_email_creator/formatters/formatter.rb', line 18
def format
@text
end
|
#id ⇒ Object
22
23
24
|
# File 'lib/html_email_creator/formatters/formatter.rb', line 22
def id
self.class.id
end
|