Sha256: 3f9c9c87f0d880101e7957436eb876a2b9352f40d0f9b19b34bf597ba90b6128

Contents?: true

Size: 1.01 KB

Versions: 244

Compression:

Stored size: 1.01 KB

Contents

/*:nodoc:*
 * class ActionCount
 *
 * This counts the number of times a keyword argument occurs.
 * For example, this is useful for increasing verbosity levels
 *
 * This class inherided from [[Action]]
 *
 **/
'use strict';

var util = require('util');

var Action = require('../action');

/*:nodoc:*
 * new ActionCount(options)
 * - options (object): options hash see [[Action.new]]
 *
 **/
var ActionCount = module.exports = function ActionCount(options) {
  options = options || {};
  options.nargs = 0;

  Action.call(this, options);
};
util.inherits(ActionCount, Action);

/*:nodoc:*
 * ActionCount#call(parser, namespace, values, optionString) -> Void
 * - parser (ArgumentParser): current parser
 * - namespace (Namespace): namespace for output data
 * - values (Array): parsed values
 * - optionString (Array): input option string(not parsed)
 *
 * Call the action. Save result in namespace object
 **/
ActionCount.prototype.call = function (parser, namespace) {
  namespace.set(this.dest, (namespace[this.dest] || 0) + 1);
};

Version data entries

244 entries across 229 versions & 26 rubygems

Version Path
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/argparse/lib/action/count.js
disco_app-0.14.0 test/dummy/node_modules/argparse/lib/action/count.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/argparse/lib/action/count.js
appmap-0.66.2 ./node_modules/argparse/lib/action/count.js
appmap-0.66.1 ./node_modules/argparse/lib/action/count.js
appmap-0.66.0 ./node_modules/argparse/lib/action/count.js
appmap-0.65.1 ./node_modules/argparse/lib/action/count.js
appmap-0.65.0 ./node_modules/argparse/lib/action/count.js
appmap-0.64.0 ./node_modules/argparse/lib/action/count.js
appmap-0.63.0 ./node_modules/argparse/lib/action/count.js
appmap-0.62.1 ./node_modules/argparse/lib/action/count.js
tang-0.2.1 spec/tang_app/node_modules/argparse/lib/action/count.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/argparse/lib/action/count.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/argparse/lib/action/count.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/argparse/lib/action/count.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/argparse/lib/action/count.js
tang-0.2.0 spec/tang_app/node_modules/argparse/lib/action/count.js
tang-0.1.0 spec/tang_app/node_modules/argparse/lib/action/count.js
tang-0.0.9 spec/tang_app/node_modules/argparse/lib/action/count.js
enju_library-0.3.8 spec/dummy/node_modules/argparse/lib/action/count.js