Sha256: c03b18aa17e60f892d9e3dee1897a2dcb5fae1be063e14cf9156f7f7ee1e9826

Contents?: true

Size: 425 Bytes

Versions: 24

Compression:

Stored size: 425 Bytes

Contents

require 'mail'

module Delayed
  class PerformableMailer < PerformableMethod
    def perform
      object.send(method_name, *args).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 RuntimeError, "Use MyMailer.delay.mailer_action(args) to delay sending of emails."
  end
end

Version data entries

24 entries across 24 versions & 4 rubygems

Version Path
delayed_job-4.0.2 lib/delayed/performable_mailer.rb
delayed_job-4.0.1 lib/delayed/performable_mailer.rb
delayed_job-4.0.0 lib/delayed/performable_mailer.rb
delayed_job-4.0.0.beta2 lib/delayed/performable_mailer.rb
delayed_job-4.0.0.beta1 lib/delayed/performable_mailer.rb
delayed_job-3.0.5 lib/delayed/performable_mailer.rb
delayed_job-3.0.4 lib/delayed/performable_mailer.rb
drewda_delayed_job-3.0.3 lib/delayed/performable_mailer.rb
delayed_job-3.0.3 lib/delayed/performable_mailer.rb
delayed_job_unique_key-0.0.4 lib/delayed/performable_mailer.rb
delayed_job-3.0.2 lib/delayed/performable_mailer.rb
delayed_job-3.0.1 lib/delayed/performable_mailer.rb
delayed_job-3.0.0 lib/delayed/performable_mailer.rb
delayed_job_unique_key-0.0.3 lib/delayed/performable_mailer.rb
delayed_job_unique_key-0.0.2 lib/delayed/performable_mailer.rb
delayed_job_unique_key-0.0.1 lib/delayed/performable_mailer.rb
delayed_job-3.0.0.pre4 lib/delayed/performable_mailer.rb
delayed_job-3.0.0.pre3 lib/delayed/performable_mailer.rb
delayed_job-3.0.0.pre2 lib/delayed/performable_mailer.rb
delayed_job-3.0.0.pre lib/delayed/performable_mailer.rb