Class: Merb::Rack::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/merb-core/rack/application.rb

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/merb-core/rack/application.rb', line 5

def call(env) 
  begin
    controller = ::Merb::Dispatcher.handle(env)
  rescue Object => e
    return [500, {"Content-Type"=>"text/html"}, e.message + "<br/>" + e.backtrace.join("<br/>")]
  end
  Merb.logger.info "\n\n"
  Merb.logger.flush
  [controller.status, controller.headers, controller.body]
end