Class: Rails::Application::RoutesReloader
- Includes:
- ActiveSupport::Callbacks
- Defined in:
- railties/lib/rails/application/routes_reloader.rb
Constant Summary
Constants included from ActiveSupport::Callbacks
ActiveSupport::Callbacks::CALLBACK_FILTER_TYPES
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.
-
#run_after_load_paths ⇒ Object
writeonly
:nodoc:.
Instance Method Summary collapse
-
#initialize ⇒ RoutesReloader
constructor
A new instance of RoutesReloader.
- #reload! ⇒ Object
Methods included from ActiveSupport::Callbacks
Methods included from ActiveSupport::Concern
#append_features, #class_methods, extended, #included, #prepend_features, #prepended
Constructor Details
#initialize ⇒ RoutesReloader
Returns a new instance of RoutesReloader.
15 16 17 18 19 20 |
# File 'railties/lib/rails/application/routes_reloader.rb', line 15 def initialize @paths = [] @route_sets = [] @external_routes = [] @eager_load = false end |
Instance Attribute Details
#eager_load ⇒ Object
Returns the value of attribute eager_load
11 12 13 |
# File 'railties/lib/rails/application/routes_reloader.rb', line 11 def eager_load @eager_load end |
#external_routes ⇒ Object (readonly)
Returns the value of attribute external_routes
10 11 12 |
# File 'railties/lib/rails/application/routes_reloader.rb', line 10 def external_routes @external_routes end |
#paths ⇒ Object (readonly)
Returns the value of attribute paths
10 11 12 |
# File 'railties/lib/rails/application/routes_reloader.rb', line 10 def paths @paths end |
#route_sets ⇒ Object (readonly)
Returns the value of attribute route_sets
10 11 12 |
# File 'railties/lib/rails/application/routes_reloader.rb', line 10 def route_sets @route_sets end |
#run_after_load_paths=(value) ⇒ Object
:nodoc:
12 13 14 |
# File 'railties/lib/rails/application/routes_reloader.rb', line 12 def run_after_load_paths=(value) @run_after_load_paths = value end |
Instance Method Details
#reload! ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'railties/lib/rails/application/routes_reloader.rb', line 22 def reload! clear! load_paths finalize! route_sets.each(&:eager_load!) if eager_load ensure revert end |