Class: ResqueQueueable::Queue
- Inherits:
-
Object
- Object
- ResqueQueueable::Queue
- Defined in:
- lib/resque-queueable.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#klass ⇒ Object
Returns the value of attribute klass.
Instance Method Summary collapse
-
#initialize(klass, id) ⇒ Queue
constructor
A new instance of Queue.
- #method_missing(method, *args) ⇒ Object
Constructor Details
#initialize(klass, id) ⇒ Queue
Returns a new instance of Queue.
37 38 39 40 |
# File 'lib/resque-queueable.rb', line 37 def initialize(klass, id) @klass = klass @id = id end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
42 43 44 45 |
# File 'lib/resque-queueable.rb', line 42 def method_missing(method, *args) Resque.enqueue(klass, id, method, *args) true end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
35 36 37 |
# File 'lib/resque-queueable.rb', line 35 def id @id end |
#klass ⇒ Object
Returns the value of attribute klass.
35 36 37 |
# File 'lib/resque-queueable.rb', line 35 def klass @klass end |