Class: Wurk::Worker::JobsView
- Inherits:
-
Array
- Object
- Array
- Wurk::Worker::JobsView
- Defined in:
- lib/wurk/worker.rb
Overview
What MyJob.jobs returns. Queues indexes by queue and groups by class on
read, so the rows are a fresh Array; #clear still has to reach the store,
because MyJob.jobs.clear is the documented way to reset a class between
tests. Other in-place mutators stay local to this copy.
Instance Method Summary collapse
- #clear ⇒ Object
-
#initialize(klass, rows) ⇒ JobsView
constructor
A new instance of JobsView.
Constructor Details
#initialize(klass, rows) ⇒ JobsView
Returns a new instance of JobsView.
110 111 112 113 |
# File 'lib/wurk/worker.rb', line 110 def initialize(klass, rows) super(rows) @klass = klass end |
Instance Method Details
#clear ⇒ Object
115 116 117 118 |
# File 'lib/wurk/worker.rb', line 115 def clear ::Wurk::Queues.clear_class(@klass) super end |