lib/githooks.js
function Hook(hookName, taskNames, options) {

  /**
   * The name of the hook
   * @property hookName
   * @type {String}
   */
  this.hookName = hookName;

  /**
   * The name of the tasks that should be run by the hook, space separated
   * @property taskNames
   * @type {String}
   */
  this.taskNames = taskNames;

  /**
   * Options for the creation of the hook
   * @property options
   * @type {Object}
   */
  this.options = options || {};

  this.markerRegExp = new RegExp(this.options.startMarker.replace(/\//g, '\\/') +
                      '[\\s\\S]*' + // Not .* because it needs to match \n
                      this.options.endMarker.replace(/\//g, '\\/'), 'm');
}
function Hook(hookName, taskNames, options) {

  /**
   * The name of the hook
   * @property hookName
   * @type {String}
   */
  this.hookName = hookName;

  /**
   * The name of the tasks that should be run by the hook, space separated
   * @property taskNames
   * @type {String}
   */
  this.taskNames = taskNames;

  /**
   * Options for the creation of the hook
   * @property options
   * @type {Object}
   */
  this.options = options || {};

  this.markerRegExp = new RegExp(this.options.startMarker.replace(/\//g, '\\/') +
                      '[\\s\\S]*' + // Not .* because it needs to match \n
                      this.options.endMarker.replace(/\//g, '\\/'), 'm');
}
function Hook ( hookName , taskNames , options ) { /**
   * The name of the hook
   * @property hookName
   * @type {String}
   */ this . hookName = hookName ; /**
   * The name of the tasks that should be run by the hook, space separated
   * @property taskNames
   * @type {String}
   */ this . taskNames = taskNames ; /**
   * Options for the creation of the hook
   * @property options
   * @type {Object}
   */ this . options = options || { } ; this . markerRegExp = new RegExp ( this . options . startMarker . replace ( / \/ / g , '\\/' ) + '[\\s\\S]*' + // Not .* because it needs to match \n this . options . endMarker . replace ( / \/ / g , '\\/' ) , 'm' ) ; }
Class to help manage a hook
@class Hook
@module githooks
@constructor
Class to help manage a hook