Module: Wayfarer::Middleware::Worker::InstanceMethods
- Defined in:
- lib/wayfarer/middleware/worker.rb
Instance Method Summary collapse
Instance Method Details
#call(task) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/wayfarer/middleware/worker.rb', line 16 def call(task) run_callbacks :action do public_send(task..action) end yield if block_given? end |
#chain ⇒ Object
24 25 26 |
# File 'lib/wayfarer/middleware/worker.rb', line 24 def chain Wayfarer::Middleware::Chain.new([*Wayfarer.middleware, self]) end |