Class: WEBrick::FerretBrowserHandler
- Inherits:
-
HTTPServlet::AbstractServlet
- Object
- HTTPServlet::AbstractServlet
- WEBrick::FerretBrowserHandler
- Defined in:
- lib/ferret/browser/webrick.rb
Instance Method Summary collapse
-
#do_GET(req, res) ⇒ Object
Handler for WEBrick requests (also aliased as do_POST).
-
#initialize(server, reader, path) ⇒ FerretBrowserHandler
constructor
Creates a FerretBrowserHandler, which answers for the application within
klass
.
Constructor Details
#initialize(server, reader, path) ⇒ FerretBrowserHandler
Creates a FerretBrowserHandler, which answers for the application within klass
.
5 6 7 8 |
# File 'lib/ferret/browser/webrick.rb', line 5 def initialize(server, reader, path) super(server) @delegator = Ferret::Browser::Delegator.new(reader, path) end |
Instance Method Details
#do_GET(req, res) ⇒ Object
Handler for WEBrick requests (also aliased as do_POST).
10 11 12 |
# File 'lib/ferret/browser/webrick.rb', line 10 def do_GET(req, res) res.status, res.content_type, res.body = @delegator.run(req.) end |