Class: Mailtime::NullTemplate
- Inherits:
-
Object
- Object
- Mailtime::NullTemplate
- Defined in:
- lib/mailtime/renderers/null.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
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.
28 29 30 |
# File 'lib/mailtime/renderers/null.rb', line 28 def initialize(mail) @content = mail.body.raw_source end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
27 28 29 |
# File 'lib/mailtime/renderers/null.rb', line 27 def content @content end |
Instance Method Details
#mail_layout ⇒ Object
32 33 34 |
# File 'lib/mailtime/renderers/null.rb', line 32 def mail_layout NullLayout.new end |
#render(mail) ⇒ Object
doesn’t do anything since we already know the mail.
41 42 43 |
# File 'lib/mailtime/renderers/null.rb', line 41 def render(mail) @content end |
#renderer ⇒ Object
36 37 38 |
# File 'lib/mailtime/renderers/null.rb', line 36 def renderer Mailtime::Renderers::ErbRenderer end |