diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-08-07 19:01:46 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-08-07 19:01:46 -0300 |
commit | 42c569e71eb587d6f375b209d354cc1075ca6817 (patch) | |
tree | e554566788ad6b02e4b20510d6661b7ca5b529d5 | |
parent | 399f5f6346829210b4d58ed5f7c6d4d73ef67737 (diff) | |
parent | 6c9669e8f0553a6d5d67cf64ba2273f527a2072a (diff) | |
download | rails-42c569e71eb587d6f375b209d354cc1075ca6817.tar.gz rails-42c569e71eb587d6f375b209d354cc1075ca6817.tar.bz2 rails-42c569e71eb587d6f375b209d354cc1075ca6817.zip |
Merge pull request #16424 from gregors/remove_dead_code
remove dead file_watcher code
-rw-r--r-- | activesupport/lib/active_support/file_watcher.rb | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/activesupport/lib/active_support/file_watcher.rb b/activesupport/lib/active_support/file_watcher.rb deleted file mode 100644 index 81e63e76a7..0000000000 --- a/activesupport/lib/active_support/file_watcher.rb +++ /dev/null @@ -1,36 +0,0 @@ -module ActiveSupport - class FileWatcher - class Backend - def initialize(path, watcher) - @watcher = watcher - @path = path - end - - def trigger(files) - @watcher.trigger(files) - end - end - - def initialize - @regex_matchers = {} - end - - def watch(pattern, &block) - @regex_matchers[pattern] = block - end - - 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 - end -end |