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



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

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

#before_fork(&block) ⇒ Object



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

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

#between_responses(&block) ⇒ Object



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

def between_responses(&block);  @base.between_responses_procs << block; end

#count_workers(value) ⇒ Object



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

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

#log_file(value) ⇒ Object



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

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

#on_exception(&block) ⇒ Object



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

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

#pid_file(value) ⇒ Object



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

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

#respond_to?(*args) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#worker(&block) ⇒ Object



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

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