Class: BBServer::Handlers::NotFoundHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/bbserver/handlers/not_found_handler.rb

Instance Method Summary collapse

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

#handleObject



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