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
45 46 47 48 49 |
# File 'lib/devproxy/cli/server.rb', line 45 def initialize(*args) super mount "/" , Servlet mount "/css", WEBrick::HTTPServlet::FileHandler, File.join(File.dirname(__FILE__),"..","..","..","data","css") end |
Instance Method Details
#shutdown ⇒ Object
58 59 60 61 62 |
# File 'lib/devproxy/cli/server.rb', line 58 def shutdown @mutex.synchronize do super end if @mutex end |
#start(*args) ⇒ Object
51 52 53 54 55 56 |
# File 'lib/devproxy/cli/server.rb', line 51 def start(*args) @mutex ||= Mutex.new @thread ||= Thread.new do super(*args) end end |