From f4a5c938d461d9c5dc17f521c9efaaf352b931fa Mon Sep 17 00:00:00 2001 From: zedshaw Date: Sat, 25 Mar 2006 21:15:30 +0000 Subject: First crack at some advanced debugging features for mongrel and the console. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@121 19e92222-5c0b-0410-8929-a290d50e31e9 --- lib/mongrel/handlers.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'lib/mongrel/handlers.rb') diff --git a/lib/mongrel/handlers.rb b/lib/mongrel/handlers.rb index 609a252..7d817bb 100644 --- a/lib/mongrel/handlers.rb +++ b/lib/mongrel/handlers.rb @@ -5,9 +5,32 @@ module Mongrel # just the minimum necessary for you to handle a request and shoot back # a response. Look at the HttpRequest and HttpResponse objects for how # to use them. + # + # This is used for very simple handlers that don't require much to operate. + # More extensive plugins or those you intend to distribute as GemPlugins + # should be implemented using the HttpHandlerPlugin mixin. + # class HttpHandler + + def process(request, response) + end + end + + + # This is used when your handler is implemented as a GemPlugin. + # The plugin always takes an options hash which you can modify + # and then access later. They are stored by default for + # the process method later. + module HttpHandlerPlugin + attr_reader :options + + def initialize(options={}) + @options = options + end + def process(request, response) end + end -- cgit v1.2.3-24-ge0c7