class Emque::Consuming::Control

Public Class Methods

new() click to toggle source
# File lib/emque/consuming/control.rb, line 9
def initialize
  @errors = Emque::Consuming::Control::Errors.new
  @workers = Emque::Consuming::Control::Workers.new
end

Public Instance Methods

errors(*args) click to toggle source
# File lib/emque/consuming/control.rb, line 14
def errors(*args)
  if args[0] && @errors.respond_to?(args[0])
    @errors.send(args.shift, *args)
    true
  else
    @errors
  end
end
workers(topic = nil, command = nil, *args) click to toggle source
# File lib/emque/consuming/control.rb, line 23
def workers(topic = nil, command = nil, *args)
  if command && topic && @workers.respond_to?(command)
    @workers.send(command, topic, *args)
    true
  else
    @workers
  end
end