Class: Onyx::FakeServer

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/onyx_client/fake_server.rb

Constant Summary collapse

@@storage =
{}

Class Method Summary collapse

Class Method Details

.startObject



36
37
38
39
40
41
# File 'lib/onyx_client/fake_server.rb', line 36

def self.start
  @thread = Thread.new do
    run!
  end
  sleep(1)
end

.stopObject



43
44
45
# File 'lib/onyx_client/fake_server.rb', line 43

def self.stop
  @thread.kill
end