Class: Class

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

Overview

The Node representation of a CoffeeScript class.

Direct Known Subclasses

File

Instance Method Summary

Inherited Method Summary

Methods inherited from Node

.findAncestor

Instance Method Details

String ::getClassName() Source

Get the full class name

Returns:

  • (String) — Returns the class (a String)

::getDoc() Source

Get the class doc

Returns:

  • Returns the class doc (a [Doc])

String ::getFileName() Source

Get the source file name.

Returns:

  • (String) — Returns the filename of the class (a String)

String ::getFullName() Source

Alias for ::getClassName

Returns:

  • (String) — Returns the full class name (a String)

Number ::getLocation() Source

Get the source line number

Returns:

  • (Number) — Returns a Number.

Array ::getMethods() Source

Get all methods.

Returns:

  • (Array) — Returns the methods as an Array.

String ::getName() Source

Get the class name

Returns:

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

String ::getNamespace() Source

Get the class namespace

Returns:

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

String ::getParentClassName() Source

Get the full parent class name

Returns:

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

Array ::getVariables() Source

Get all variables.

Returns:

  • (Array) — Returns the variables as an Array.

Object ::toJSON() Source

Get a JSON representation of the object

Returns:

  • (Object) — Returns the JSON object (an Object)