Class: RhoDevelopment::Shutdown

Inherits:
WEBrick::HTTPServlet::AbstractServlet
  • Object
show all
Defined in:
lib/build/development/web_server.rb

Instance Method Summary collapse

Constructor Details

#initialize(server) ⇒ Shutdown

Returns a new instance of Shutdown.



139
140
141
142
# File 'lib/build/development/web_server.rb', line 139

def initialize server
  super server
  @server = server
end

Instance Method Details

#do_GET(request, response) ⇒ Object



144
145
146
147
148
# File 'lib/build/development/web_server.rb', line 144

def do_GET request, response
  response.status = 200
  response.body = 'Web server was shut down'
  @server.shutdown
end