Permalink
Browse files

Merge pull request #35 from drewyoung1/master

Add Arg#apply and Opt#apply (Fixes #34)
  • Loading branch information...
2 parents 274e2a2 + 5751b9f commit 28db21a9d130db2721c84585d8863eee43bd1a5b @arikon arikon committed Nov 15, 2012
Showing with 36 additions and 0 deletions.
  1. +10 −0 lib/arg.js
  2. +10 −0 lib/opt.js
  3. +8 −0 src/arg.coffee
  4. +8 −0 src/opt.coffee
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -120,3 +120,11 @@ exports.Arg = class Arg
@returns {COA.Cmd} parent command
###
end: Cmd::end
+
+ ###*
+ Apply function with arguments in context of arg instance.
+ @param {Function} fn
+ @param {Array} args
+ @returns {COA.Arg} this instance (for chainability)
+ ###
+ apply: Cmd::apply
View
@@ -233,3 +233,11 @@ exports.Opt = class Opt
@returns {COA.Cmd} parent command
###
end: Cmd::end
+
+ ###*
+ Apply function with arguments in context of option instance.
+ @param {Function} fn
+ @param {Array} args
+ @returns {COA.Opt} this instance (for chainability)
+ ###
+ apply: Cmd::apply

0 comments on commit 28db21a

Please sign in to comment.