Class: Mixin

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

Overview

The Node representation of a CoffeeScript mixins

Instance Method Summary

Inherited Method Summary

Methods inherited from Node

.findAncestor

Constructor Details

.constructor(node, fileName, options, comment)

Construct a mixin

Parameters:

  • (Object) nodeThe mixin node (a {Object})
  • (String) fileNameThe filename (a {String})
  • (Object) optionsThe parser options (a {Object})
  • (Object) commentThe comment node (a {Object})

Instance Method Details

.getDoc()

Get the mixin doc

Returns:

  • Returns the mixin doc (a [Doc])

String .getFileName()

Get the source file name.

Returns:

  • (String) — Returns the filename of the mixin (a {String}).

.getFullName()

Alias for {::getMixinName}

Array .getMethods()

Get all methods.

Returns:

  • (Array) — Returns an {Array} of all the {Method}s.

String .getMixinName()

Get the full mixin name

Returns:

  • (String) — Returns full mixin name (a {String}).

String .getName()

Gets the mixin name

Returns:

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

String .getNamespace()

Get the mixin namespace

Returns:

  • (String) — Returns the namespace (a {String}).

Array .getVariables()

Get all variables.

Returns:

  • (Array) — Returns an {Array} of all the {Variable}s.

Object .toJSON()

Get a JSON representation of the object

Returns:

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