Class Parameter

Defined in: src/nodes/parameter.coffee
Inherits: Node

Overview

Public: The Node representation of a CoffeeScript method parameter.

Instance Method Summary

Inherited Method Summary

Methods inherited from Node

.findAncestor

Constructor Details

::constructor(node, options, optionized) Source

Public: Construct a parameter node. node - The node (a Object) options - The parser options (a Object) optionized - A Boolean indicating if the parameter is a set of options

Parameters:

  • (Object) nodeThe node (a Object)
  • (Object) optionsThe parser options (a Object)
  • (Boolean) optionizedA Boolean indicating if the parameter is a set of options

Instance Method Details

String ::getDefault(i = -1) Source

Public: Get the parameter default value Returns the default (a String).

Returns:

  • (String) — Returns the default (a String).

String ::getName(i = -1) Source

Public: Get the parameter name Returns the name (a String).

Returns:

  • (String) — Returns the name (a String).

String ::getOptionizedDefaults() Source

Public: Gets the defaults of the optionized parameters. Returns the defaults as a String.

Returns:

  • (String) — Returns the defaults as a String.

String ::getSignature() Source

Public: Get the full parameter signature. Returns the signature (a String).

Returns:

  • (String) — Returns the signature (a String).

Boolean ::isSplat() Source

Public: Checks if the parameters is a splat Returns `true` if a splat (a Boolean).

Returns:

  • (Boolean) — Returns true if a splat (a Boolean).

Object ::toJSON(i = -1) Source

Public: Get a JSON representation of the object Returns the JSON object (a Object).

Returns:

  • (Object) — Returns the JSON object (a Object).