Class: Sassic::Server
Instance Method Summary collapse
-
#initialize(port = 2000) ⇒ Server
constructor
A new instance of Server.
- #start(options = {}) ⇒ Object
Constructor Details
#initialize(port = 2000) ⇒ Server
Returns a new instance of Server.
8 9 10 |
# File 'lib/sassic/server.rb', line 8 def initialize(port=2000) @port = port end |
Instance Method Details
#start(options = {}) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/sassic/server.rb', line 12 def start(={}) s = HTTPServer.new(.merge(:Port => @port)) setup_mount_points(s) trap("INT") { s.shutdown } s.start end |