Class: NSIVideoGranulate::FakeServerManager
- Inherits:
-
Object
- Object
- NSIVideoGranulate::FakeServerManager
- Defined in:
- lib/nsivideogranulate/fake_server.rb
Instance Method Summary collapse
-
#start_server(port = 9886) ⇒ Object
Start the nsi.videogranulate fake server.
-
#stop_server ⇒ Object
Stop the fake server.
Instance Method Details
#start_server(port = 9886) ⇒ Object
Start the nsi.videogranulate fake server
56 57 58 59 60 61 62 63 |
# File 'lib/nsivideogranulate/fake_server.rb', line 56 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 fake server
66 67 68 69 |
# File 'lib/nsivideogranulate/fake_server.rb', line 66 def stop_server @thread.kill self end |