Class: InciScore::Server
- Inherits:
-
Object
- Object
- InciScore::Server
- Defined in:
- lib/inci_score/server.rb
Constant Summary collapse
- RACKUP_FILE =
File.("../../../config.ru", __FILE__)
- DEFAULT_HOST =
"0.0.0.0"
- CPUs =
Etc.nprocessors
Instance Method Summary collapse
-
#initialize(port: 9292, threads: "0:#{CPUs*4}", workers: CPUs, preload: false, config_klass: Puma::Configuration, launcher_klass: Puma::Launcher) ⇒ Server
constructor
A new instance of Server.
- #run ⇒ Object
Constructor Details
#initialize(port: 9292, threads: "0:#{CPUs*4}", workers: CPUs, preload: false, config_klass: Puma::Configuration, launcher_klass: Puma::Launcher) ⇒ Server
11 12 13 14 15 16 17 18 19 |
# File 'lib/inci_score/server.rb', line 11 def initialize(port: 9292, threads: "0:#{CPUs*4}", workers: CPUs, preload: false, config_klass: Puma::Configuration, launcher_klass: Puma::Launcher) @port = port @workers = workers @threads = threads.split(":") @preload = preload @config_klass = config_klass @launcher_klass = launcher_klass end |
Instance Method Details
#run ⇒ Object
21 22 23 |
# File 'lib/inci_score/server.rb', line 21 def run launcher.run end |