Class: QueueMap::Consumer::Configurator

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

Instance Method Summary collapse

Constructor Details

#initialize(base) ⇒ Configurator

Returns a new instance of Configurator.



6
7
8
# File 'lib/queue_map/consumer.rb', line 6

def initialize(base)
  @base = base
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args) ⇒ Object



26
27
28
# File 'lib/queue_map/consumer.rb', line 26

def method_missing(method_name, *args)
  @base.send(method_name, *args)
end

Instance Method Details

#after_fork(&block) ⇒ Object



11
# File 'lib/queue_map/consumer.rb', line 11

def after_fork(&block);         @base.after_fork_procs        << block; end

#after_response(&block) ⇒ Object



12
# File 'lib/queue_map/consumer.rb', line 12

def after_response(&block);     @base.after_response_procs    << block; end

#before_fork(&block) ⇒ Object



10
# File 'lib/queue_map/consumer.rb', line 10

def before_fork(&block);        @base.before_fork_procs       << block; end

#before_job(&block) ⇒ Object



13
# File 'lib/queue_map/consumer.rb', line 13

def before_job(&block);         @base.before_job_procs        << block; end

#count_workers(value) ⇒ Object



16
# File 'lib/queue_map/consumer.rb', line 16

def count_workers(value);       @base.count_workers           =  value; end

#idle(&block) ⇒ Object



19
# File 'lib/queue_map/consumer.rb', line 19

def idle(&block);               @base.idle_proc               =  block; end

#job_timeout(value) ⇒ Object



20
# File 'lib/queue_map/consumer.rb', line 20

def job_timeout(value);         @base.job_timeout             =  value; end

#log_file(value) ⇒ Object



18
# File 'lib/queue_map/consumer.rb', line 18

def log_file(value);            @base.log_file                =  value; end

#on_exception(&block) ⇒ Object



15
# File 'lib/queue_map/consumer.rb', line 15

def on_exception(&block);       @base.on_exception_proc       =  block; end

#pid_file(value) ⇒ Object



17
# File 'lib/queue_map/consumer.rb', line 17

def pid_file(value);            @base.pid_file                =  value; end

#respond_to?(*args) ⇒ Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/queue_map/consumer.rb', line 22

def respond_to?(*args)
  super || @base.respond_to?(*args)
end

#worker(&block) ⇒ Object



14
# File 'lib/queue_map/consumer.rb', line 14

def worker(&block);             @base.worker_proc             =  block; end