Class: Rails::Application::RoutesReloader

Inherits:
Object
  • Object
show all
Defined in:
railties/lib/rails/application/routes_reloader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRoutesReloader

Returns a new instance of RoutesReloader


9
10
11
12
# File 'railties/lib/rails/application/routes_reloader.rb', line 9

def initialize
  @paths      = []
  @route_sets = []
end

Instance Attribute Details

#pathsObject (readonly)

Returns the value of attribute paths


6
7
8
# File 'railties/lib/rails/application/routes_reloader.rb', line 6

def paths
  @paths
end

#route_setsObject (readonly)

Returns the value of attribute route_sets


6
7
8
# File 'railties/lib/rails/application/routes_reloader.rb', line 6

def route_sets
  @route_sets
end

Instance Method Details

#reload!Object


14
15
16
17
18
19
20
# File 'railties/lib/rails/application/routes_reloader.rb', line 14

def reload!
  clear!
  load_paths
  finalize!
ensure
  revert
end