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.
202 203 204 205 |
# File 'lib/build/development/web_server.rb', line 202 def initialize server, server_instance super server @instance = server_instance end |
Instance Method Details
#do_GET(request, response) ⇒ Object
207 208 209 210 |
# File 'lib/build/development/web_server.rb', line 207 def do_GET request, response response.status = 200 response.body = (@instance.auto_update_pid || 0).to_s end |
#do_POST(request, response) ⇒ Object
212 213 214 215 216 217 218 |
# File 'lib/build/development/web_server.rb', line 212 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 |