Sha256: b77f6255d0be29db786f9d2073721f1ca03baa87534a93dacdbcea977130a888

Contents?: true

Size: 1.1 KB

Versions: 139

Compression:

Stored size: 1.1 KB

Contents

/*:nodoc:*
 * class ActionHelp
 *
 * Support action for printing help
 * This class inherided from [[Action]]
 **/
'use strict';

var util = require('util');

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

// Constants
var $$  = require('../const');

/*:nodoc:*
 * new ActionHelp(options)
 * - options (object): options hash see [[Action.new]]
 *
 **/
var ActionHelp = module.exports = function ActionHelp(options) {
  options = options || {};
  if (options.defaultValue !== null) {
    options.defaultValue = options.defaultValue;
  }
  else {
    options.defaultValue = $$.SUPPRESS;
  }
  options.dest = (options.dest !== null ? options.dest: $$.SUPPRESS);
  options.nargs = 0;
  Action.call(this, options);

};
util.inherits(ActionHelp, Action);

/*:nodoc:*
 * ActionHelp#call(parser, namespace, values, optionString)
 * - parser (ArgumentParser): current parser
 * - namespace (Namespace): namespace for output data
 * - values (Array): parsed values
 * - optionString (Array): input option string(not parsed)
 *
 * Print help and exit
 **/
ActionHelp.prototype.call = function (parser) {
  parser.printHelp();
  parser.exit();
};

Version data entries

139 entries across 125 versions & 8 rubygems

Version Path
trusty-festivity-extension-2.3.20 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.19 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.18 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.17 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.16 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.15 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.14 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.13 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.12 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.11g node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.10 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.9 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.8 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.7 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.6 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.5 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.4 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.3 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.2 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js
trusty-festivity-extension-2.3.1 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/lib/action/help.js