Parent

Class Index [+]

Quicksearch

ActiveSupport::FileWatcher

Public Class Methods

new() click to toggle source
    # File lib/active_support/file_watcher.rb, line 14
14:     def initialize
15:       @regex_matchers = {}
16:     end

Public Instance Methods

trigger(files) click to toggle source
    # File lib/active_support/file_watcher.rb, line 22
22:     def trigger(files)
23:       trigger_files = Hash.new { |h,k| h[k] = Hash.new { |h2,k2| h2[k2] = [] } }
24: 
25:       files.each do |file, state|
26:         @regex_matchers.each do |pattern, block|
27:           trigger_files[block][state] << file if pattern === file
28:         end
29:       end
30: 
31:       trigger_files.each do |block, payload|
32:         block.call payload
33:       end
34:     end
watch(pattern, &block) click to toggle source
    # File lib/active_support/file_watcher.rb, line 18
18:     def watch(pattern, &block)
19:       @regex_matchers[pattern] = block
20:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.