Permalink
Browse files

temporary fix for http://github.com/collectiveidea/delayed_job/issues…

…/issue/113

rename PerformableMethod#method -> #delayed_method to avoid overriding
Object#method
  • Loading branch information...
guns
guns committed Sep 7, 2010
1 parent 6f63660 commit ecfc1e436d4c9b991f46ca2d3d732a6fb1060007
Showing with 7 additions and 7 deletions.
  1. +1 −1 lib/delayed/performable_mailer.rb
  2. +6 −6 lib/delayed/performable_method.rb
@@ -3,7 +3,7 @@
module Delayed
class PerformableMailer < PerformableMethod
def perform
- object.send(method, *args).deliver
+ object.send(delayed_method, *args).deliver
end
end
end
@@ -1,19 +1,19 @@
module Delayed
- class PerformableMethod < Struct.new(:object, :method, :args)
- def initialize(object, method, args)
- raise NoMethodError, "undefined method `#{method}' for #{object.inspect}" unless object.respond_to?(method, true)
+ class PerformableMethod < Struct.new(:object, :delayed_method, :args)
+ def initialize(object, delayed_method, args)
+ raise NoMethodError, "undefined method `#{delayed_method}' for #{object.inspect}" unless object.respond_to?(delayed_method, true)
self.object = object
self.args = args
- self.method = method.to_sym
+ self.delayed_method = delayed_method.to_sym
end
def display_name
- "#{object.class}##{method}"
+ "#{object.class}##{delayed_method}"
end
def perform
- object.send(method, *args) if object
+ object.send(delayed_method, *args) if object
end
def method_missing(symbol, *args)

0 comments on commit ecfc1e4

Please sign in to comment.