Class: RhoDevelopment::AutoUpdatePID
- Inherits:
-
WEBrick::HTTPServlet::AbstractServlet
- Object
- WEBrick::HTTPServlet::AbstractServlet
- RhoDevelopment::AutoUpdatePID
- Defined in:
- lib/build/development/web_server.rb
Instance Method Summary collapse
- #do_GET(request, response) ⇒ Object
- #do_POST(request, response) ⇒ Object
-
#initialize(server, server_instance) ⇒ AutoUpdatePID
constructor
A new instance of AutoUpdatePID.
Constructor Details
#initialize(server, server_instance) ⇒ AutoUpdatePID
Returns a new instance of AutoUpdatePID.
200 201 202 203 |
# File 'lib/build/development/web_server.rb', line 200 def initialize server, server_instance super server @instance = server_instance end |
Instance Method Details
#do_GET(request, response) ⇒ Object
205 206 207 208 |
# File 'lib/build/development/web_server.rb', line 205 def do_GET request, response response.status = 200 response.body = (@instance.auto_update_pid || 0).to_s end |
#do_POST(request, response) ⇒ Object
210 211 212 213 214 215 216 |
# File 'lib/build/development/web_server.rb', line 210 def do_POST request, response puts request.query.to_s @instance.auto_update_pid = request.query['pid'].to_i response.status = 200 response.body = "auto_update_pid set to #{@instance.auto_update_pid}" end |