Class: Rails::Application::RoutesReloader
Relationships & Source Files | |
Inherits: | Object |
Defined in: | railties/lib/rails/application/routes_reloader.rb |
Class Method Summary
- .new ⇒ RoutesReloader constructor
Instance Attribute Summary
- #eager_load rw
- #execute readonly
- #execute_if_updated readonly
- #external_routes readonly
- #paths readonly
- #route_sets readonly
Instance Method Summary
Constructor Details
.new ⇒ RoutesReloader
# File 'railties/lib/rails/application/routes_reloader.rb', line 12
def initialize @paths = [] @route_sets = [] @external_routes = [] @eager_load = false end
Instance Attribute Details
#eager_load (rw)
[ GitHub ]# File 'railties/lib/rails/application/routes_reloader.rb', line 9
attr_accessor :eager_load
#execute (readonly)
[ GitHub ]# File 'railties/lib/rails/application/routes_reloader.rb', line 10
delegate :execute_if_updated, :execute, :updated?, to: :updater
#execute_if_updated (readonly)
[ GitHub ]#external_routes (readonly)
[ GitHub ]# File 'railties/lib/rails/application/routes_reloader.rb', line 8
attr_reader :route_sets, :paths, :external_routes
#paths (readonly)
[ GitHub ]# File 'railties/lib/rails/application/routes_reloader.rb', line 8
attr_reader :route_sets, :paths, :external_routes
#route_sets (readonly)
[ GitHub ]# File 'railties/lib/rails/application/routes_reloader.rb', line 8
attr_reader :route_sets, :paths, :external_routes
Instance Method Details
#reload!
[ GitHub ]# File 'railties/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
#updated? ⇒ Boolean
# File 'railties/lib/rails/application/routes_reloader.rb', line 10
delegate :execute_if_updated, :execute, :updated?, to: :updater