Class: BBServer::Handlers::NotFoundHandler
- Inherits:
-
Object
- Object
- BBServer::Handlers::NotFoundHandler
- Defined in:
- lib/bbserver/handlers/not_found_handler.rb
Instance Method Summary collapse
- #handle ⇒ Object
-
#initialize(context) ⇒ NotFoundHandler
constructor
A new instance of NotFoundHandler.
Constructor Details
#initialize(context) ⇒ NotFoundHandler
Returns a new instance of NotFoundHandler.
5 6 7 |
# File 'lib/bbserver/handlers/not_found_handler.rb', line 5 def initialize(context) @context = context end |
Instance Method Details
#handle ⇒ Object
9 10 11 12 |
# File 'lib/bbserver/handlers/not_found_handler.rb', line 9 def handle @context.response.write_status 404 @context.response.write_body "Not Found" end |