Class: Webify::Backend::Webrick
- Inherits:
-
Object
- Object
- Webify::Backend::Webrick
- Includes:
- WEBrick
- Defined in:
- lib/webify/backend/webrick.rb
Class Method Summary collapse
Class Method Details
.start!(options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/webify/backend/webrick.rb', line 9 def self.start!(={}) dir = File.([:dir] || Webify::DEFAULT_DIR) port = [:port] || Webify::DEFAULT_PORT server = HTTPServer.new( :Port => port, :DocumentRoot => dir ) trap('INT') { server.shutdown } server.start end |