Class: Devproxy::CLI::Server
- Inherits:
-
WEBrick::HTTPServer
- Object
- WEBrick::HTTPServer
- Devproxy::CLI::Server
- Defined in:
- lib/devproxy/cli/server.rb
Defined Under Namespace
Classes: Servlet
Instance Method Summary collapse
-
#initialize(*args) ⇒ Server
constructor
A new instance of Server.
- #shutdown ⇒ Object
- #start(*args) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Server
Returns a new instance of Server.
48 49 50 51 52 |
# File 'lib/devproxy/cli/server.rb', line 48 def initialize(*args) super mount "/" , Servlet mount "/css", WEBrick::HTTPServlet::FileHandler, File.join(File.dirname(__FILE__),"..","..","..","data","css") end |
Instance Method Details
#shutdown ⇒ Object
61 62 63 64 65 |
# File 'lib/devproxy/cli/server.rb', line 61 def shutdown @mutex.synchronize do super end if @mutex end |
#start(*args) ⇒ Object
54 55 56 57 58 59 |
# File 'lib/devproxy/cli/server.rb', line 54 def start(*args) @mutex ||= Mutex.new @thread ||= Thread.new do super(*args) end end |