class ActionController::Metal

def self.dispatch(name, req, res)

executes the action named +name+.
Direct dispatch to the controller. Instantiates the controller, then
def self.dispatch(name, req, res)
  if middleware_stack.any?
    middleware_stack.build(name) { |env| new.dispatch(name, req, res) }.call req.env
  else
    new.dispatch(name, req, res)
  end
end