Class: Mailtime::NullLayout
- Inherits:
-
Object
- Object
- Mailtime::NullLayout
- Defined in:
- lib/mailtime/renderers/null.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ NullLayout
constructor
A new instance of NullLayout.
- #render(mail) ⇒ Object
- #renderer ⇒ Object
Constructor Details
#initialize ⇒ NullLayout
Returns a new instance of NullLayout.
7 8 9 |
# File 'lib/mailtime/renderers/null.rb', line 7 def initialize @content = "#{Mailtime.configuration.yield_keyword}" end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
6 7 8 |
# File 'lib/mailtime/renderers/null.rb', line 6 def content @content end |
Class Method Details
.renders ⇒ Object
11 12 13 |
# File 'lib/mailtime/renderers/null.rb', line 11 def self.renders ['erb'] end |
Instance Method Details
#render(mail) ⇒ Object
19 20 21 |
# File 'lib/mailtime/renderers/null.rb', line 19 def render(mail) renderer.new(mail, @content).render end |
#renderer ⇒ Object
15 16 17 |
# File 'lib/mailtime/renderers/null.rb', line 15 def renderer Mailtime::Renderers::ErbRenderer end |