Skip to content
Browse files

Composition > inheritance.

  • Loading branch information...
1 parent 9147613 commit 5c234ab8ed4659a74a6c47ce8337055a62f75eff @josevalim josevalim committed Dec 12, 2011
Showing with 11 additions and 3 deletions.
  1. +11 −3 railties/lib/rails/application/routes_reloader.rb
View
14 railties/lib/rails/application/routes_reloader.rb
@@ -1,13 +1,21 @@
module Rails
class Application
- class RoutesReloader < ::ActiveSupport::FileUpdateChecker
+ class RoutesReloader
attr_reader :route_sets
- def initialize
- super([]) { reload! }
+ def initialize(updater=ActiveSupport::FileUpdateChecker)
+ @updater = updater.new([]) { reload! }
@route_sets = []
end
+ def paths
+ @updater.paths
+ end
+
+ def execute_if_updated
+ @updater.execute_if_updated
+ end
+
def reload!
clear!
load_paths

0 comments on commit 5c234ab

Please sign in to comment.
Something went wrong with that request. Please try again.