Class: Hippo::Templates::TenantChange

Inherits:
Mail show all
Defined in:
lib/hippo/templates/tenant_change.rb

Instance Method Summary collapse

Methods inherited from Mail

create, #pathname

Methods inherited from Liquid

#extension, #render, #template

Methods inherited from Base

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

Constructor Details

#initialize(tenant) ⇒ TenantChange

Returns a new instance of TenantChange.



4
5
6
# File 'lib/hippo/templates/tenant_change.rb', line 4

def initialize(tenant)
    @tenant = tenant
end

Instance Method Details

#subjectObject



12
13
14
# File 'lib/hippo/templates/tenant_change.rb', line 12

def subject
    "The login address for #{Hippo.config.product_name} has changed"
end

#toObject



8
9
10
# File 'lib/hippo/templates/tenant_change.rb', line 8

def to
    @tenant.email
end

#variablesObject



16
17
18
19
20
21
# File 'lib/hippo/templates/tenant_change.rb', line 16

def variables
    super.merge(
        'slug' => @tenant.slug,
        'domain' => @tenant.domain
    )
end