Module: PusherFake::Server::ChainTrapHandlers
- Defined in:
- lib/pusher-fake/server/chain_trap_handlers.rb
Overview
Monkeypatch to ensure previous trap handlers are called when new handlers are added.
Instance Method Summary collapse
-
#trap(*arguments) ⇒ Object
Ensure a previous trap is chained when a new trap is added.
Instance Method Details
#trap(*arguments) ⇒ Object
Ensure a previous trap is chained when a new trap is added.
14 15 16 17 18 19 20 |
# File 'lib/pusher-fake/server/chain_trap_handlers.rb', line 14 def trap(*arguments) previous_trap = super do yield previous_trap&.call end end |