Class: Qless::ClientWorkers

Inherits:
Object
  • Object
show all
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

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

#countsObject



113
114
115
# File 'lib/qless.rb', line 113

def counts
  JSON.parse(@client.call('workers'))
end