Class: Qless::ClientWorkers

Inherits:
Object
  • Object
show all
Defined in:
lib/qless.rb

Instance Method Summary collapse

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

#countsObject



90
91
92
# File 'lib/qless.rb', line 90

def counts
  JSON.parse(@client._workers.call([], [Time.now.to_i]))
end