Use class << self

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9201 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2008-04-01 19:16:55 +00:00
parent e223216e9a
commit 6a74360f97
1 changed files with 20 additions and 18 deletions

View File

@ -13,29 +13,31 @@ require 'rails/gem_dependency'
RAILS_ENV = (ENV['RAILS_ENV'] || 'development').dup unless defined?(RAILS_ENV)
module Rails
# The Configuration instance used to configure the Rails environment
def self.configuration
@@configuration
end
class << self
# The Configuration instance used to configure the Rails environment
def configuration
@@configuration
end
def self.configuration=(configuration)
@@configuration = configuration
end
def configuration=(configuration)
@@configuration = configuration
end
def self.logger
RAILS_DEFAULT_LOGGER
end
def logger
RAILS_DEFAULT_LOGGER
end
def self.root
RAILS_ROOT
end
def root
RAILS_ROOT
end
def self.env
RAILS_ENV
end
def env
RAILS_ENV
end
def self.cache
RAILS_CACHE
def cache
RAILS_CACHE
end
end
# The Initializer is responsible for processing the Rails configuration, such