Class: Rails::Server
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Rack::Server
|
|
Instance Chain:
self,
Rack::Server
|
|
Inherits: |
Rack::Server
|
Defined in: | railties/lib/rails/commands/server/server_command.rb |
Class Method Summary
- .new(options = nil) ⇒ Server constructor
Instance Method Summary
Constructor Details
.new(options = nil) ⇒ Server
# File 'railties/lib/rails/commands/server/server_command.rb', line 19
def initialize( = nil) @default_options = || {} super(@default_options) set_environment end
Instance Method Details
#default_options
[ GitHub ]# File 'railties/lib/rails/commands/server/server_command.rb', line 55
def super.merge(@default_options) end
#middleware
[ GitHub ]#opt_parser
[ GitHub ]#served_url
[ GitHub ]# File 'railties/lib/rails/commands/server/server_command.rb', line 59
def served_url "#{ [:SSLEnable] ? 'https' : 'http'}://#{ [:Host]}:#{ [:Port]}" unless use_puma? end
#set_environment
[ GitHub ]# File 'railties/lib/rails/commands/server/server_command.rb', line 29
def set_environment ENV["RAILS_ENV"] ||= [:environment] end
#start(after_stop_callback = nil)
[ GitHub ]# File 'railties/lib/rails/commands/server/server_command.rb', line 33
def start(after_stop_callback = nil) trap(:INT) { exit } create_tmp_directories setup_dev_caching log_to_stdout if [:log_stdout] super() ensure after_stop_callback.call if after_stop_callback end