Class: Creeper::Extensions::DelayedMailer
- Inherits:
-
Object
- Object
- Creeper::Extensions::DelayedMailer
- Includes:
- Worker
- Defined in:
- lib/creeper/extensions/action_mailer.rb
Overview
Adds ‘delay’ and ‘delay_for’ to ActionMailer to offload arbitrary email delivery to Creeper. Example:
UserMailer.delay.send_welcome_email(new_user)
UserMailer.delay_for(5.days).send_welcome_email(new_user)
Instance Method Summary collapse
Methods included from Worker
Instance Method Details
#perform(yml) ⇒ Object
17 18 19 20 |
# File 'lib/creeper/extensions/action_mailer.rb', line 17 def perform(yml) (target, method_name, args) = YAML.load(yml) target.send(method_name, *args).deliver end |