module PusherFake::Server::ChainTrapHandlers

Monkeypatch to ensure previous trap handlers are called when new handlers are added.

@see PusherFake::Server.chain_trap_handlers

Public Instance Methods

trap(*arguments) { || ... } click to toggle source

Ensure a previous trap is chained when a new trap is added.

@see Signal.trap

Calls superclass method
# File lib/pusher-fake/server/chain_trap_handlers.rb, line 14
def trap(*arguments)
  previous_trap = super do
    yield

    previous_trap&.call
  end
end