Class: ResqueQueueable::Queue

Inherits:
Object
  • Object
show all
Defined in:
lib/resque-queueable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject

Returns the value of attribute id.



35
36
37
# File 'lib/resque-queueable.rb', line 35

def id
  @id
end

#klassObject

Returns the value of attribute klass.



35
36
37
# File 'lib/resque-queueable.rb', line 35

def klass
  @klass
end