panino
Version:
API documentation generator with a strict grammar and testing tools
27 lines (14 loc) • 532 B
JavaScript
'use strict';
// 3rd-party
var Action = require('argparse').Action;
////////////////////////////////////////////////////////////////////////////////
var LazyChoices = module.exports = function LazyChoices(options) {
options = options || {};
Action.call(this, options);
delete this.choices;
this.__defineGetter__('choices', options.choices);
};
require('util').inherits(LazyChoices, Action);
LazyChoices.prototype.call = function (parser, namespace, values, optionString) {
namespace.set(this.dest, values);
};