Sha256: a38a10040e95b2bbeabf862cd7a40a93c7ba02cb6b6624348f401dd252abc41a
Contents?: true
Size: 464 Bytes
Versions: 7
Compression:
Stored size: 464 Bytes
Contents
require 'mail' module Delayed class PerformableMailer < PerformableMethod def perform mailer = super mailer.respond_to?(:deliver_now) ? mailer.deliver_now : mailer.deliver end end module DelayMail def delay(options = {}) DelayProxy.new(PerformableMailer, self, options) end end end Mail::Message.class_eval do def delay(*_args) raise 'Use MyMailer.delay.mailer_action(args) to delay sending of emails.' end end
Version data entries
7 entries across 7 versions & 1 rubygems