Skip to content
Browse files

Merge pull request #8395 from bmaland/attr_accessors

Use attr_accessor for Rails.{application,cache,logger}
  • Loading branch information...
2 parents 3f95908 + b9d1d2c commit bef330803ae4a30bfeaf6dd9c86077cfb5e250e1 @carlosantoniodasilva carlosantoniodasilva committed
Showing with 1 addition and 23 deletions.
  1. +1 −23 railties/lib/rails.rb
View
24 railties/lib/rails.rb
@@ -24,13 +24,7 @@ module Rails
autoload :InfoController, 'rails/info_controller'
class << self
- def application
- @application ||= nil
- end
-
- def application=(application)
- @application = application
- end
+ attr_accessor :application, :cache, :logger
# The Configuration instance used to configure the Rails environment
def configuration
@@ -64,14 +58,6 @@ def initialized?
application.initialized?
end
- def logger
- @logger ||= nil
- end
-
- def logger=(logger)
- @logger = logger
- end
-
def backtrace_cleaner
@backtrace_cleaner ||= begin
# Relies on Active Support, so we have to lazy load to postpone definition until AS has been loaded
@@ -95,14 +81,6 @@ def env=(environment)
@_env = ActiveSupport::StringInquirer.new(environment)
end
- def cache
- @cache ||= nil
- end
-
- def cache=(cache)
- @cache = cache
- end
-
# Returns all rails groups for loading based on:
#
# * The Rails environment;

0 comments on commit bef3308

Please sign in to comment.
Something went wrong with that request. Please try again.