Class: OddJob::Info
- Inherits:
-
WEBrick::HTTPServlet::AbstractServlet
- Object
- WEBrick::HTTPServlet::AbstractServlet
- OddJob::Info
- Includes:
- HtmlRender
- Defined in:
- lib/oddjob.rb
Overview
Webrick servlet for creating the information page.
Instance Method Summary collapse
-
#do_GET(request, response) ⇒ Object
Respond to get request, returns informational page.
-
#initialize(server, cmd_usage, *options) ⇒ Info
constructor
Standard servlet initialization function with an additional
cmd_usageargument for specifying the command line usage of the OddJob module’s calling entity.
Methods included from HtmlRender
Constructor Details
#initialize(server, cmd_usage, *options) ⇒ Info
Standard servlet initialization function with an additional cmd_usage argument for specifying the command line usage of the OddJob module’s calling entity.
133 134 135 136 |
# File 'lib/oddjob.rb', line 133 def initialize(server, cmd_usage, *) @usage = cmd_usage super(server, ) end |
Instance Method Details
#do_GET(request, response) ⇒ Object
Respond to get request, returns informational page.
140 141 142 143 144 |
# File 'lib/oddjob.rb', line 140 def do_GET(request, response) response.status = 200 response['Content-Type'] = "text/html" response.body = info_page end |