Class: Parameter

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

Overview

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

Construct a parameter node.

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

Get the parameter default value

Returns:

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

String ::getName(i = -1) Source

Get the parameter name

Returns:

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

String ::getOptionizedDefaults() Source

Gets the defaults of the optionized parameters.

Returns:

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

String ::getSignature() Source

Get the full parameter signature.

Returns:

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

Boolean ::isSplat() Source

Checks if the parameters is a splat

Returns:

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

Object ::toJSON(i = -1) Source

Get a JSON representation of the object

Returns:

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