class Rails::Application

def instance

def instance
  if self == Rails::Application
    if Rails.application
      ActiveSupport::Deprecation.warn "Calling a method in Rails::Application is deprecated, " <<
        "please call it directly in your application constant #{Rails.application.class.name}.", caller
    end
    Rails.application
  else
    @@instance ||= new
  end
end