Class VirtualMethod

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

Overview

Public: 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

Public: Construct a virtual method node. entity - The method's Class doc - The property node (a Object) options - The parser options (a Object)

Parameters:

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

Instance Method Details

String ::getCoffeeScriptSource() Source

Public: Get the method source in CoffeeScript Returns the CoffeeScript source (a String).

Returns:

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

Doc ::getDoc() Source

Public: Get the class doc Returns the class doc (a Doc).

Returns:

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

String ::getJavaScriptSource() Source

Public: Get the method source in JavaScript Returns the JavaScript source (a String).

Returns:

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

String ::getName() Source

Public: Get the method name Returns the method name (a String).

Returns:

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

::getParameters() Source

Public: Get the method parameters params - The method parameters

Parameters:

  • paramsThe method parameters

String ::getShortSignature() Source

Public: Get the short method signature. Returns the short signature (a String).

Returns:

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

String ::getSignature() Source

Public: Get the full method signature. Returns the signature (a String).

Returns:

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

String ::getType() Source

Public: Get the method type, either `class`, `instance` or `mixin`. Returns the method type (a String).

Returns:

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

Object ::toJSON() Source

Public: Get a JSON representation of the object Returns the JSON object (a Object).

Returns:

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