Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 719b628bdd
17 lines (16 sloc) 0.51 kb
module Delayed
module MessageSending
def send_later(method, *args)
Delayed::Job.enqueue Delayed::PerformableMethod.new(self, method.to_sym, args)
end
module ClassMethods
def handle_asynchronously(method)
without_name = "#{method}_without_send_later"
define_method("#{method}_with_send_later") do |*args|
send_later(without_name, *args)
end
alias_method_chain method, :send_later
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.