Class: Qless::ClientWorkers
- Inherits:
-
Object
- Object
- Qless::ClientWorkers
- Defined in:
- lib/qless.rb
Overview
A class for interacting with workers. Not meant to be instantiated directly, it’s accessed through Client#workers
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.
109 110 111 |
# File 'lib/qless.rb', line 109 def initialize(client) @client = client end |
Instance Method Details
#[](name) ⇒ Object
117 118 119 |
# File 'lib/qless.rb', line 117 def [](name) JSON.parse(@client.call('workers', name)) end |
#counts ⇒ Object
113 114 115 |
# File 'lib/qless.rb', line 113 def counts JSON.parse(@client.call('workers')) end |