aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/application/configurable.rb
blob: f598e339656fb08cd3cc434f395e4acb0367ea09 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module Rails
  class Application
    module Configurable
      def self.included(base)
        base.extend ClassMethods
      end

      module ClassMethods
        def inherited(base)
          raise "You cannot inherit from a Rails::Application child"
        end
      end

      def config
        @config ||= Application::Configuration.new(self.class.find_root_with_flag("config.ru", Dir.pwd))
      end
    end
  end
end