aboutsummaryrefslogblamecommitdiffstats
path: root/railties/lib/rails/railtie/configurable.rb
blob: a2eb938c5a4b097966bdef8eab8c20b0a6cd0d61 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                
                                                












                                                                
module Rails
  class Railtie
    module Configurable
      def self.included(base)
        base.extend ClassMethods
      end

      module ClassMethods
        def config
          @config ||= Railtie::Configuration.new
        end

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

      def config
        self.class.config
      end
    end
  end
end