Method: ActiveSupport::FileWatcher#trigger
- Defined in:
- lib/active_support/file_watcher.rb
#trigger(files) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/active_support/file_watcher.rb', line 22 def trigger(files) trigger_files = Hash.new { |h,k| h[k] = Hash.new { |h2,k2| h2[k2] = [] } } files.each do |file, state| @regex_matchers.each do |pattern, block| trigger_files[block][state] << file if pattern === file end end trigger_files.each do |block, payload| block.call payload end end |