aboutsummaryrefslogblamecommitdiffstats
path: root/railties/lib/rails/application.rb
blob: 6139e20e95fdad074d164be3748f68d19ffb921c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13

                   
 









                                   
       
 

                                       

       



                       
                 
                                       



                    
module Rails
  class Application

    def self.config
      @config ||= Configuration.new
    end

    def self.config=(config)
      @config = config
    end

    def config
      self.class.config
    end

    def routes
      ActionController::Routing::Routes
    end

    def middleware
      config.middleware
    end

    def call(env)
      @app ||= middleware.build(routes)
      @app.call(env)
    end
  end
end