Class: Mailtime::NullLayout

Inherits:
Object
  • Object
show all
Defined in:
lib/mailtime/renderers/null.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeNullLayout

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

#contentObject (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

.rendersObject



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

#rendererObject



15
16
17
# File 'lib/mailtime/renderers/null.rb', line 15

def renderer
  Mailtime::Renderers::ErbRenderer
end