Class: WEBrick::HTTPServlet::ProcHandler
- Inherits:
-
AbstractServlet
- Object
- AbstractServlet
- WEBrick::HTTPServlet::ProcHandler
- Defined in:
- lib/webrick/httpservlet/prochandler.rb
Instance Method Summary collapse
- #do_GET(request, response) ⇒ Object (also: #do_POST)
- #get_instance(server, *options) ⇒ Object
-
#initialize(proc) ⇒ ProcHandler
constructor
A new instance of ProcHandler.
Methods inherited from AbstractServlet
#do_HEAD, #do_OPTIONS, get_instance, #service
Constructor Details
#initialize(proc) ⇒ ProcHandler
Returns a new instance of ProcHandler.
21 22 23 |
# File 'lib/webrick/httpservlet/prochandler.rb', line 21 def initialize(proc) @proc = proc end |
Instance Method Details
#do_GET(request, response) ⇒ Object Also known as: do_POST
25 26 27 |
# File 'lib/webrick/httpservlet/prochandler.rb', line 25 def do_GET(request, response) @proc.call(request, response) end |
#get_instance(server, *options) ⇒ Object
17 18 19 |
# File 'lib/webrick/httpservlet/prochandler.rb', line 17 def get_instance(server, *) self end |