Class: NSICloudooo::FakeServerManager
- Inherits:
-
Object
- Object
- NSICloudooo::FakeServerManager
- Defined in:
- lib/nsicloudooo/fake_server.rb
Instance Method Summary collapse
-
#start_server(port = 9886) ⇒ Object
Start the nsi.cloudooo fake server.
-
#stop_server ⇒ Object
Stop the SAM fake server.
Instance Method Details
#start_server(port = 9886) ⇒ Object
Start the nsi.cloudooo fake server
63 64 65 66 67 68 69 70 |
# File 'lib/nsicloudooo/fake_server.rb', line 63 def start_server(port=9886) @thread = Thread.new do Server.prepare Server.run! :port => port end sleep(1) self end |
#stop_server ⇒ Object
Stop the SAM fake server
73 74 75 76 |
# File 'lib/nsicloudooo/fake_server.rb', line 73 def stop_server @thread.kill self end |