Class: Rails::Server
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Rackup::Server
|
|
Instance Chain:
self,
Rackup::Server
|
|
Inherits: |
Rackup::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 18
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 54
def super.merge(@default_options) end
#middleware
[ GitHub ]#opt_parser
[ GitHub ]#served_url
[ GitHub ]# File 'railties/lib/rails/commands/server/server_command.rb', line 58
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 28
def set_environment ENV["RAILS_ENV"] ||= [:environment] end
#start(after_stop_callback = nil)
[ GitHub ]# File 'railties/lib/rails/commands/server/server_command.rb', line 32
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