Class: Lapine::Consumer::Middleware::App
- Inherits:
-
Object
- Object
- Lapine::Consumer::Middleware::App
- Defined in:
- lib/lapine/consumer/middleware.rb
Instance Attribute Summary collapse
-
#chain ⇒ Object
Returns the value of attribute chain.
Instance Method Summary collapse
Instance Attribute Details
#chain ⇒ Object
Returns the value of attribute chain.
82 83 84 |
# File 'lib/lapine/consumer/middleware.rb', line 82 def chain @chain end |
Instance Method Details
#call(message, &block) ⇒ Object
84 85 86 87 88 |
# File 'lib/lapine/consumer/middleware.rb', line 84 def call(, &block) chain << block if block_given? current_register = chain.shift current_register.call() if current_register end |