Class: Rails::Application::RoutesReloader
- Inherits:
-
Object
- Object
- Rails::Application::RoutesReloader
- Defined in:
- lib/rails/application/routes_reloader.rb
Instance Attribute Summary collapse
-
#eager_load ⇒ Object
Returns the value of attribute eager_load.
-
#external_routes ⇒ Object
readonly
Returns the value of attribute external_routes.
-
#paths ⇒ Object
readonly
Returns the value of attribute paths.
-
#route_sets ⇒ Object
readonly
Returns the value of attribute route_sets.
Instance Method Summary collapse
-
#initialize ⇒ RoutesReloader
constructor
A new instance of RoutesReloader.
- #reload! ⇒ Object
Constructor Details
#initialize ⇒ RoutesReloader
Returns a new instance of RoutesReloader.
12 13 14 15 16 17 |
# File 'lib/rails/application/routes_reloader.rb', line 12 def initialize @paths = [] @route_sets = [] @external_routes = [] @eager_load = false end |
Instance Attribute Details
#eager_load ⇒ Object
Returns the value of attribute eager_load.
9 10 11 |
# File 'lib/rails/application/routes_reloader.rb', line 9 def eager_load @eager_load end |
#external_routes ⇒ Object (readonly)
Returns the value of attribute external_routes.
8 9 10 |
# File 'lib/rails/application/routes_reloader.rb', line 8 def external_routes @external_routes end |
#paths ⇒ Object (readonly)
Returns the value of attribute paths.
8 9 10 |
# File 'lib/rails/application/routes_reloader.rb', line 8 def paths @paths end |
#route_sets ⇒ Object (readonly)
Returns the value of attribute route_sets.
8 9 10 |
# File 'lib/rails/application/routes_reloader.rb', line 8 def route_sets @route_sets end |
Instance Method Details
#reload! ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/rails/application/routes_reloader.rb', line 19 def reload! clear! load_paths finalize! route_sets.each(&:eager_load!) if eager_load ensure revert end |