Class: Mailtime::NullTemplate
- Inherits:
-
Object
- Object
- Mailtime::NullTemplate
- Defined in:
- lib/mailtime/renderers/null_template.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(mail) ⇒ NullTemplate
constructor
A new instance of NullTemplate.
- #mail_layout ⇒ Object
-
#render(mail) ⇒ Object
doesn’t do anything since we already know the mail.
- #renderer ⇒ Object
Constructor Details
#initialize(mail) ⇒ NullTemplate
Returns a new instance of NullTemplate.
5 6 7 8 |
# File 'lib/mailtime/renderers/null_template.rb', line 5 def initialize(mail) @id = nil @content = mail.body.raw_source end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
4 5 6 |
# File 'lib/mailtime/renderers/null_template.rb', line 4 def content @content end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/mailtime/renderers/null_template.rb', line 4 def id @id end |
Instance Method Details
#mail_layout ⇒ Object
10 11 12 |
# File 'lib/mailtime/renderers/null_template.rb', line 10 def mail_layout NullLayout.new end |
#render(mail) ⇒ Object
doesn’t do anything since we already know the mail.
19 20 21 |
# File 'lib/mailtime/renderers/null_template.rb', line 19 def render(mail) @content end |
#renderer ⇒ Object
14 15 16 |
# File 'lib/mailtime/renderers/null_template.rb', line 14 def renderer Mailtime::Renderers::ErbRenderer end |