Class: Hippo::Templates::Mail

Inherits:
Liquid show all
Defined in:
lib/hippo/templates/mail.rb

Direct Known Subclasses

TenantChange

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Liquid

#extension, #render, #template

Methods inherited from Base

#class_as_name, #extension, #filename, format, #root_path, #source

Class Method Details

.create(*arg) ⇒ Object


21
22
23
# File 'lib/hippo/templates/mail.rb', line 21

def self.create(*arg)
    Hippo::Mailer.from_template(self.new(*arg))
end

Instance Method Details

#pathnameObject


13
14
15
# File 'lib/hippo/templates/mail.rb', line 13

def pathname
    root_path.join('mail', filename)
end

#subjectObject


9
10
11
# File 'lib/hippo/templates/mail.rb', line 9

def subject
    raise 'virtual method subject called, this should be implemented by child class'
end

#toObject


5
6
7
# File 'lib/hippo/templates/mail.rb', line 5

def to
    raise 'virtual method to called, this should be implemented by child class'
end

#variablesObject


17
18
19
# File 'lib/hippo/templates/mail.rb', line 17

def variables
    { 'product_name' => Hippo.config.product_name }
end