Class: Thrifter::Queueing::Proxy
- Inherits:
- BasicObject
- Defined in:
- lib/thrifter/extensions/queueing.rb
Instance Method Summary collapse
-
#initialize(target) ⇒ Proxy
constructor
A new instance of Proxy.
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize(target) ⇒ Proxy
Returns a new instance of Proxy.
22 23 24 |
# File 'lib/thrifter/extensions/queueing.rb', line 22 def initialize(target) @target = target end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/thrifter/extensions/queueing.rb', line 26 def method_missing(name, *args, &block) if target.respond_to? name job_args = [ target.class.to_s, name ].concat(args) Job.perform_async(*job_args) else super end end |