Class: VirtualMethod

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

Overview

The Node representation of a CoffeeScript virtual method that has

Instance Method Summary

Inherited Method Summary

Methods inherited from Node

.findAncestor

Constructor Details

.constructor(entity, doc, options)

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()

Get the method source in CoffeeScript

Returns:

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

Doc .getDoc()

Get the class doc

Returns:

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

String .getJavaScriptSource()

Get the method source in JavaScript

Returns:

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

String .getName()

Get the method name

Returns:

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

.getParameters()

Get the method parameters

Parameters:

  • paramsThe method parameters

String .getShortSignature()

Get the short method signature.

Returns:

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

String .getSignature()

Get the full method signature.

Returns:

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

String .getType()

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

Returns:

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

Object .toJSON()

Get a JSON representation of the object

Returns:

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