# class ActionDispatch::Callbacks

Provide callbacks to be executed before and after the request dispatch.

### Public Class Methods

after(*args, &block) click to toggle source

    # File lib/action_dispatch/middleware/callbacks.rb, line 18
    def self.after(*args, &block)
      set_callback(:call, :after, *args, &block)
    end

before(*args, &block) click to toggle source

    # File lib/action_dispatch/middleware/callbacks.rb, line 14
    def self.before(*args, &block)
      set_callback(:call, :before, *args, &block)
    end

new(app) click to toggle source

    # File lib/action_dispatch/middleware/callbacks.rb, line 22
    def initialize(app)
      @app = app
    end

### Public Instance Methods

call(env) click to toggle source

    # File lib/action_dispatch/middleware/callbacks.rb, line 26
    def call(env)
      run_callbacks :call do
        @app.call(env)
      end
    end