Class | Guard::Watcher |
In: |
lib/guard/watcher.rb
|
Parent: | Object |
The watcher defines a RegExp that will be matched against file system modifications. When a watcher matches a change, an optional action block is executed to enable processing the file system change result.
action | [RW] | |
pattern | [RW] |
Finds the files that matches a Guard.
@param [Guard::Guard] guard the Guard plugin which watchers are used @param [Array<String>] files the changed files @return [Array<Object>] the matched watcher response
Test if a file would be matched by any of the Guard plugin watchers.
@param [Array<Guard::Guard>] guards the Guard plugins to use the watchers from @param [Array<String>] files the files to test @return [Boolean] Whether a file matches
Executes a watcher action.
@param [String, MatchData] matches the matched path or the match from the Regex @return [String] the final paths