From 32a5b49911b88e8e410583d382e8253004abce50 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Mon, 19 Jul 2010 17:53:14 +0200 Subject: Move singleton pattern to Railtie and remove Engine::Configurable and Application::Configurable in favor of unified Railtie::Configurable --- railties/lib/rails/engine/configurable.rb | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 railties/lib/rails/engine/configurable.rb (limited to 'railties/lib/rails/engine') diff --git a/railties/lib/rails/engine/configurable.rb b/railties/lib/rails/engine/configurable.rb deleted file mode 100644 index e668911913..0000000000 --- a/railties/lib/rails/engine/configurable.rb +++ /dev/null @@ -1,31 +0,0 @@ -module Rails - class Engine - module Configurable - def self.included(base) - base.extend ClassMethods - base.private_class_method :new - end - - module ClassMethods - delegate :middleware, :root, :paths, :to => :config - delegate :call, :to => :instance - - def config - @config ||= Engine::Configuration.new(find_root_with_flag("lib")) - end - - def inherited(base) - raise "You cannot inherit from a Rails::Engine child" - end - - def instance - @instance ||= new - end - end - - def config - self.class.config - end - end - end -end -- cgit v1.2.3