Class: Daemonizer::FakeHandler
- Defined in:
- lib/daemonizer/handler.rb
Instance Attribute Summary
Attributes inherited from Handler
#logger, #worker_id, #workers_count
Instance Method Summary collapse
-
#initialize(prepare, start, handler_options = {}) ⇒ FakeHandler
constructor
A new instance of FakeHandler.
- #prepare(block) ⇒ Object
- #start ⇒ Object
Methods inherited from Handler
Constructor Details
#initialize(prepare, start, handler_options = {}) ⇒ FakeHandler
Returns a new instance of FakeHandler.
31 32 33 34 35 |
# File 'lib/daemonizer/handler.rb', line 31 def initialize(prepare, start, = {}) @prepare = prepare @start = start super() end |
Instance Method Details
#prepare(block) ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/daemonizer/handler.rb', line 37 def prepare(block) if @prepare @prepare.call(Daemonizer.logger, block) else super end end |
#start ⇒ Object
45 46 47 |
# File 'lib/daemonizer/handler.rb', line 45 def start @start.call(Daemonizer.logger, @worker_id, @workers_count) end |