Class: Qless::ClientWorkers
- Inherits:
-
Object
- Object
- Qless::ClientWorkers
- Defined in:
- lib/qless.rb
Instance Method Summary collapse
- #[](name) ⇒ Object
- #counts ⇒ Object
-
#initialize(client) ⇒ ClientWorkers
constructor
A new instance of ClientWorkers.
Constructor Details
#initialize(client) ⇒ ClientWorkers
Returns a new instance of ClientWorkers.
86 87 88 |
# File 'lib/qless.rb', line 86 def initialize(client) @client = client end |
Instance Method Details
#[](name) ⇒ Object
94 95 96 |
# File 'lib/qless.rb', line 94 def [](name) JSON.parse(@client._workers.call([], [Time.now.to_i, name])) end |
#counts ⇒ Object
90 91 92 |
# File 'lib/qless.rb', line 90 def counts JSON.parse(@client._workers.call([], [Time.now.to_i])) end |