instance method trigger

Ruby on Rails 4.1.16

Since v3.1.12 Last seen in v4.1.16

Available in: v3.1.12 v3.2.22.5 v4.0.13 v4.1.16

Signature

trigger(files)

No documentation comment.

Parameters

files req
Source
# File activesupport/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

Defined in activesupport/lib/active_support/file_watcher.rb line 22 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::FileWatcher

Type at least 2 characters to search.

↑↓ navigate · open · esc close