Class: Class

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

Overview

A CoffeeScript class

Direct Known Subclasses

File

Instance Method Summary

Inherited Method Summary

Methods inherited from Node

.findAncestor

Constructor Details

.constructor(node, fileName, lineMapping, options, comment) Source

Construct a class

Parameters:

  • nodethe class node (a [Object])
  • fileNamethe filename (a [String])
  • optionsthe parser options (a [Object])
  • commentthe comment node (a [Object])

Instance Method Details

.getClassName() Source

Get the full class name

Returns:

  • Returns the class (a [String])

.getDoc() Source

Get the class doc

Returns:

  • Returns the class doc (a [Doc])

.getFileName() Source

Get the source file name.

Returns:

  • Returns the filename of the class (a [String])

.getFullName() Source

Alias for {#getClassName}

Returns:

  • Returns the full class name (a [String])

Number .getLocation() Source

Get the source line number

Returns:

  • (Number) — Returns a {Number}

.getMethods() Source

Get all methods.

Returns:

  • Returns the methods

.getName() Source

Get the class name

Returns:

  • Returns the name (a [String])

.getNamespace() Source

Get the class namespace

Returns:

  • Returns the namespace (a [String])

.getParentClassName() Source

Get the full parent class name

Returns:

  • Returns the parent class name (a [String])

.getVariables() Source

Get all variables.

Returns:

  • Returns the variables

Object .toJSON() Source

Get a JSON representation of the object

Returns:

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