Namespace

Class

Methods

Class Public methods

new(options = nil)

📝 Source code
# File railties/lib/rails/commands/server/server_command.rb, line 19
    def initialize(options = nil)
      @default_options = options || {}
      super(@default_options)
      set_environment
    end
🔎 See on GitHub

Instance Public methods

default_options()

📝 Source code
# File railties/lib/rails/commands/server/server_command.rb, line 55
    def default_options
      super.merge(@default_options)
    end
🔎 See on GitHub

middleware()

📝 Source code
# File railties/lib/rails/commands/server/server_command.rb, line 51
    def middleware
      Hash.new([])
    end
🔎 See on GitHub

opt_parser()

📝 Source code
# File railties/lib/rails/commands/server/server_command.rb, line 25
    def opt_parser
      Options.new
    end
🔎 See on GitHub

served_url()

📝 Source code
# File railties/lib/rails/commands/server/server_command.rb, line 59
    def served_url
      "#{options[:SSLEnable] ? 'https' : 'http'}://#{options[:Host]}:#{options[:Port]}" unless use_puma?
    end
🔎 See on GitHub

set_environment()

📝 Source code
# File railties/lib/rails/commands/server/server_command.rb, line 29
    def set_environment
      ENV["RAILS_ENV"] ||= options[:environment]
    end
🔎 See on GitHub

start(after_stop_callback = nil)

📝 Source code
# 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 options[:log_stdout]

      super()
    ensure
      after_stop_callback.call if after_stop_callback
    end
🔎 See on GitHub