Module Guard::Hook
In: lib/guard/hook.rb

Guard has a hook mechanism that allows you to insert callbacks for individual Guard plugins. By default, each of the Guard plugin instance methods has a "_begin" and an "_end" hook. For example, the Guard::Guard#start method has a :start_begin hook that is runs immediately before Guard::Guard#start, and a :start_end hook that runs immediately after Guard::Guard#start.

Read more about [hooks and callbacks on the wiki](github.com/guard/guard/wiki/Hooks-and-callbacks).

Methods

Classes and Modules

Module Guard::Hook::InstanceMethods

Public Class methods

Add a callback.

@param [Block] listener the listener to notify @param [Guard::Guard] guard_class the Guard class to add the callback @param [Array<Symbol>] events the events to register

Checks if a callback has been registered.

@param [Block] listener the listener to notify @param [Guard::Guard] guard_class the Guard class to add the callback @param [Symbol] event the event to look for

The Hook module gets included.

@param [Class] base the class that includes the module

Notify a callback.

@param [Guard::Guard] guard_class the Guard class to add the callback @param [Symbol] event the event to trigger @param [Array] args the arguments for the listener

[Validate]