From 6a74360f972c75c70b64e3b6f51bb7a64681e2e3 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 1 Apr 2008 19:16:55 +0000 Subject: [PATCH] Use class << self git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9201 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/initializer.rb | 38 +++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index d2c61b8dc9..d929fe81e2 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -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