Method: ActionView::CacheExpiry::ViewReloader#initialize
- Defined in:
- actionview/lib/action_view/cache_expiry.rb
#initialize(watcher:, &block) ⇒ ViewReloader
Returns a new instance of ViewReloader.
6 7 8 9 10 11 12 13 14 |
# File 'actionview/lib/action_view/cache_expiry.rb', line 6 def initialize(watcher:, &block) @mutex = Mutex.new @watcher_class = watcher @watched_dirs = nil @watcher = nil @previous_change = false ActionView::PathRegistry.file_system_resolver_hooks << method(:rebuild_watcher) end |