Module: TResque::Delay
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/tresque/delay.rb
Defined Under Namespace
Modules: ClassMethods
Classes: InvocationProxy
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args) ⇒ Object
30
31
32
33
34
35
36
|
# File 'lib/tresque/delay.rb', line 30
def method_missing(method_name, *args)
if method_name.to_s =~ /^delay__(.+)$/
self.delay.send($1, *args)
else
super
end
end
|
Instance Method Details
#delay(options = {}) ⇒ Object
25
26
27
|
# File 'lib/tresque/delay.rb', line 25
def delay(options = {})
InvocationProxy.new(self, options)
end
|
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
38
39
40
|
# File 'lib/tresque/delay.rb', line 38
def respond_to_missing?(method_name, include_private = false)
method_name.to_s =~ /^delay__(.+)/ || super
end
|