Updating tags for StringIO.
[rbx.git] / lib / webrick / httpservlet / prochandler.rb
blob783cb27896c1ae74f51de141f035cd4014a6a423
1
2 # prochandler.rb -- ProcHandler Class
3 #       
4 # Author: IPR -- Internet Programming with Ruby -- writers
5 # Copyright (c) 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou
6 # Copyright (c) 2002 Internet Programming with Ruby writers. All rights
7 # reserved.
8 #   
9 # $IPR: prochandler.rb,v 1.7 2002/09/21 12:23:42 gotoyuzo Exp $
11 require 'webrick/httpservlet/abstract.rb'
13 module WEBrick
14   module HTTPServlet
16     class ProcHandler < AbstractServlet
17       def get_instance(server, *options)
18         self
19       end  
21       def initialize(proc)
22         @proc = proc
23       end
25       def do_GET(request, response)
26         @proc.call(request, response)
27       end
29       alias do_POST do_GET
30     end
32   end
33 end