12345678910111213141516171819202122232425262728293031323334353637383940414243 |
-
- 'use strict';
-
- var util = require('util');
-
- var Action = require('../../action');
-
-
- var ActionStoreConstant = module.exports = function ActionStoreConstant(options) {
- options = options || {};
- options.nargs = 0;
- if (options.constant === undefined) {
- throw new Error('constant option is required for storeAction');
- }
- Action.call(this, options);
- };
- util.inherits(ActionStoreConstant, Action);
-
-
- ActionStoreConstant.prototype.call = function (parser, namespace) {
- namespace.set(this.dest, this.constant);
- };
|