Class: Rplex::Server
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Rplex::Server
- Defined in:
- lib/rplex/server.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Server
constructor
A new instance of Server.
Constructor Details
Class Method Details
.define_settings(cfg = {}) ⇒ Object
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/rplex/server.rb', line 85 def self.define_settings cfg={} cfg||={} #the settings that are not public enable :logging enable :run enable :static set :server, %w[thin mongrel webrick] set :root, File.dirname(__FILE__) #the settings that can be changed cfg[:public_folder] ||= File.dirname(__FILE__) + '/public' cfg[:port] ||= 7777 #set them set :port, cfg[:port] set :public_folder,cfg[:public_folder] end |