Class: Rails::Server::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/rails/commands/server.rb

Constant Summary collapse

DEFAULT_PID_PATH =
File.expand_path("tmp/pids/server.pid").freeze

Instance Method Summary collapse

Instance Method Details

#parse!(args) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/rails/commands/server.rb', line 12

def parse!(args)
  args, options = args.dup, {}

  option_parser(options).parse! args

  options[:log_stdout] = options[:daemonize].blank? && (options[:environment] || Rails.env) == "development"
  options[:server]     = args.shift
  options
end