Class: QC::Job
- Inherits:
-
Object
- Object
- QC::Job
- Defined in:
- lib/queue_classic/durable_array.rb
Instance Attribute Summary collapse
-
#details ⇒ Object
Returns the value of attribute details.
-
#id ⇒ Object
Returns the value of attribute id.
-
#locked_at ⇒ Object
Returns the value of attribute locked_at.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Job
constructor
A new instance of Job.
- #klass ⇒ Object
- #method ⇒ Object
- #params ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Job
Returns a new instance of Job.
7 8 9 10 11 |
# File 'lib/queue_classic/durable_array.rb', line 7 def initialize(args={}) @id = args["id"] @details = args["details"] @locked_at = args["locked_at"] end |
Instance Attribute Details
#details ⇒ Object
Returns the value of attribute details.
6 7 8 |
# File 'lib/queue_classic/durable_array.rb', line 6 def details @details end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/queue_classic/durable_array.rb', line 6 def id @id end |
#locked_at ⇒ Object
Returns the value of attribute locked_at.
6 7 8 |
# File 'lib/queue_classic/durable_array.rb', line 6 def locked_at @locked_at end |
Instance Method Details
#klass ⇒ Object
13 14 15 |
# File 'lib/queue_classic/durable_array.rb', line 13 def klass Kernel.const_get(details["job"].split(".").first) end |
#method ⇒ Object
17 18 19 |
# File 'lib/queue_classic/durable_array.rb', line 17 def method details["job"].split(".").last end |
#params ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/queue_classic/durable_array.rb', line 21 def params params = details["params"] if params.length == 1 return params[0] else params end end |