aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorGregory Ostermayr <greg@carbonfive.com>2014-08-07 16:19:20 -0400
committerGregory Ostermayr <greg@carbonfive.com>2014-08-07 16:19:20 -0400
commit6c9669e8f0553a6d5d67cf64ba2273f527a2072a (patch)
treef221147d8703ecb96fb584876f6792ac7e5ea187 /activesupport
parent69adfc9de6961e368f9023ab1d256affa49e913e (diff)
downloadrails-6c9669e8f0553a6d5d67cf64ba2273f527a2072a.tar.gz
rails-6c9669e8f0553a6d5d67cf64ba2273f527a2072a.tar.bz2
rails-6c9669e8f0553a6d5d67cf64ba2273f527a2072a.zip
remove dead file_watcher code
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/file_watcher.rb36
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