Class: Drill::Mail::Default
- Inherits:
-
Base
- Object
- Base
- Drill::Mail::Default
show all
- Defined in:
- lib/drill/mail/default.rb
Instance Attribute Summary
Attributes inherited from Base
#params
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Constructor Details
This class inherits a constructor from Drill::Base
Instance Method Details
#deliver ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/drill/mail/default.rb', line 8
def deliver
return if params.skip_delivery
template_name = params.template_name
Drill.client.messages.send_template(template_name, [], message_hash)
end
|
#deliver_later(wait: nil) ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/drill/mail/default.rb', line 16
def deliver_later(wait: nil)
return if params.skip_delivery
template_name = params.template_name
if wait
worker.perform_in(wait.to_i, template_name, message_hash)
else
worker.perform_async(template_name, message_hash)
end
end
|