Class: Mailtime::NullTemplate

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

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



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

#rendererObject



36
37
38
# File 'lib/mailtime/renderers/null.rb', line 36

def renderer
  Mailtime::Renderers::ErbRenderer
end