Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Aug 14, 2011
1 parent d439ecd commit 349e828
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/commander.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,17 @@ Command.prototype.action = function(fn){
return this;
};

/**
* Define option with `flags`, `description` and optional
* coercion `fn`.
*
* @param {String} flags
* @param {String} description
* @param {Function} fn
* @return {Command} for chaining
* @api public
*/

Command.prototype.option = function(flags, description, fn){
var self = this
, option = new Option(flags, description)
Expand Down

0 comments on commit 349e828

Please sign in to comment.