method
new
v7.1.3.4 -
Show latest stable
-
0 notes -
Class: Core
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0
- 6.1.3.1 (0)
- 6.1.7.7 (0)
- 7.0.0 (0)
- 7.1.3.2 (0)
- 7.1.3.4 (0)
- What's this?
new(files, dirs)
public
Hide source
# File activesupport/lib/active_support/evented_file_update_checker.rb, line 77 def initialize(files, dirs) @files = files.map { |file| Pathname(file).expand_path }.to_set @dirs = dirs.each_with_object({}) do |(dir, exts), hash| hash[Pathname(dir).expand_path] = Array(exts).map { |ext| ext.to_s.sub(/\A\.?/, ".") }.to_set end @common_path = common_path(@dirs.keys) @dtw = directories_to_watch @missing = [] @updated = Concurrent::AtomicBoolean.new(false) @mutex = Mutex.new start # inotify / FSEvents file descriptors are inherited on fork, so # we need to reopen them otherwise only the parent or the child # will be notified. # FIXME: this callback is keeping a reference on the instance @after_fork = ActiveSupport::ForkTracker.after_fork { start } end