Class: Cannon::Handler
- Inherits:
-
EventMachine::Connection
- Object
- EventMachine::Connection
- Cannon::Handler
- Includes:
- EventMachine::HttpServer
- Defined in:
- lib/cannon/handler.rb
Instance Method Summary collapse
Instance Method Details
#app ⇒ Object
5 6 7 8 |
# File 'lib/cannon/handler.rb', line 5 def app # magically defined by Cannon::App self.class.app end |
#process_http_request ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/cannon/handler.rb', line 10 def process_http_request request = Request.new(self, app) response = Response.new(self, app) app.reload_environment if app.config.reload_on_request app.middleware_runner.run(request, response) if middleware? end |