Class Sinatra::Dispatcher
In: lib/sinatra/dispatcher.rb
Parent: Object

Methods

Public Instance methods

[Source]

    # File lib/sinatra/dispatcher.rb, line 11
11:     def call(env)
12:       Loader.reload! if Options.environment == :development
13:     
14:       @request = Rack::Request.new(env)
15:     
16:       event = EventManager.determine_event(
17:         @request.request_method.downcase.intern, 
18:         @request.path_info
19:       )
20:     
21:       result = event.attend(@request)
22:       [result.status, default_headers.merge(result.headers), result.body]
23:     end

[Source]

   # File lib/sinatra/dispatcher.rb, line 7
7:     def default_headers
8:       { 'Content-Type' => 'text/html' }
9:     end

[Validate]