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 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 Guards watchers.
@param [Array<Guard::Guard>] guards the guards to use the watchers from @param [Array<String>] files the files to test @return [Boolean] Whether a file matches
Test if any of the files is the Guardfile.
@param [Array<String>] the files to test @return [Boolean] whether one of these files is the Guardfile
Initialize a file watcher.
@param [String, Regexp] pattern the pattern to be watched by the guard @param [Block] action the action to execute before passing the result to the Guard
Executes a watcher action.
@param [String, MatchData] matches the matched path or the match from the Regex @return [String] the final paths