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(starter, &block) ⇒ Object
- #start ⇒ Object
Methods inherited from Handler
Constructor Details
#initialize(prepare, start, handler_options = {}) ⇒ FakeHandler
Returns a new instance of FakeHandler.
28 29 30 31 32 |
# File 'lib/daemonizer/handler.rb', line 28 def initialize(prepare, start, = {}) @prepare = prepare @start = start super() end |
Instance Method Details
#prepare(starter, &block) ⇒ Object
34 35 36 37 |
# File 'lib/daemonizer/handler.rb', line 34 def prepare(starter, &block) @prepare.call(block) if @prepare super end |
#start ⇒ Object
39 40 41 |
# File 'lib/daemonizer/handler.rb', line 39 def start @start.call(@worker_id, @workers_count) end |