Class: VirtualMethod

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

Overview

The Node representation of a CoffeeScript virtual method that has been declared by the @method tag.

Instance Method Summary

Inherited Method Summary

Methods inherited from Node

.findAncestor

Constructor Details

::constructor(entity, doc, options) Source

Construct a virtual method node.

Parameters:

  • (Class) entityThe method's Class
  • (Object) docThe property node (a Object)
  • (Object) optionsThe parser options (a Object)

Instance Method Details

String ::getCoffeeScriptSource() Source

Get the method source in CoffeeScript

Returns:

  • (String) — Returns the CoffeeScript source (a String).

Doc ::getDoc() Source

Get the class doc

Returns:

  • (Doc) — Returns the class doc (a Doc).

String ::getJavaScriptSource() Source

Get the method source in JavaScript

Returns:

  • (String) — Returns the JavaScript source (a String).

String ::getName() Source

Get the method name

Returns:

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

::getParameters() Source

Get the method parameters

Parameters:

  • paramsThe method parameters

String ::getShortSignature() Source

Get the short method signature.

Returns:

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

String ::getSignature() Source

Get the full method signature.

Returns:

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

String ::getType() Source

Get the method type, either class, instance or mixin.

Returns:

  • (String) — Returns the method type (a String).

Object ::toJSON() Source

Get a JSON representation of the object

Returns:

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