Class: Gamefic::Sdk::Server

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/gamefic-sdk/server.rb

Class Method Summary collapse

Class Method Details

.run!Object



49
50
51
52
# File 'lib/gamefic-sdk/server.rb', line 49

def run!
  start_browser if settings.browser
  super
end

.start_browserObject



54
55
56
57
58
59
# File 'lib/gamefic-sdk/server.rb', line 54

def start_browser
  Thread.new {
    sleep 1 until Server.running?
    `start http://localhost:#{settings.port}`
  }
end