class Guard::Dsl

def watch(pattern, &action)

Other tags:
    See: Dsl#guard -
    See: Guard::Watcher -

Other tags:
    Yieldreturn: - a directory, a filename, an array of directories / filenames, or nothing (can be an arbitrary command)

Other tags:
    Yieldparam: m - matches of the pattern

Other tags:
    Yield: - a block to be run when the pattern is matched

Parameters:
  • pattern (String, Regexp) -- the pattern to be watched by the guard

Other tags:
    Example: Declare watchers for a Guard -
def watch(pattern, &action)
  @watchers << ::Guard::Watcher.new(pattern, action)
end