Class: Mailtime::NullLayout
- Inherits:
-
Object
- Object
- Mailtime::NullLayout
- Defined in:
- lib/mailtime/renderers/null_layout.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
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.
5 6 7 8 |
# File 'lib/mailtime/renderers/null_layout.rb', line 5 def initialize @id = nil @content = "#{Mailtime.configuration.yield_keyword}" end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
4 5 6 |
# File 'lib/mailtime/renderers/null_layout.rb', line 4 def content @content end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
4 5 6 |
# File 'lib/mailtime/renderers/null_layout.rb', line 4 def format @format end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/mailtime/renderers/null_layout.rb', line 4 def id @id end |
Class Method Details
.renders ⇒ Object
10 11 12 |
# File 'lib/mailtime/renderers/null_layout.rb', line 10 def self.renders ['erb'] end |
Instance Method Details
#render(mail) ⇒ Object
18 19 20 |
# File 'lib/mailtime/renderers/null_layout.rb', line 18 def render(mail) renderer.new(mail, @content).render end |
#renderer ⇒ Object
14 15 16 |
# File 'lib/mailtime/renderers/null_layout.rb', line 14 def renderer Mailtime::Renderers::ErbRenderer end |