Class: File

Defined in: src/nodes/file.coffee
Inherits: Class

Overview

The file class is a fake class that wraps the file body to capture top-level assigned methods.

Instance Method Summary

Inherited Method Summary

Methods inherited from Class

.getFileName, .getDoc, .getFullName, .getClassName, .getName, .getLocation, .getNamespace, .getParentClassName, .getMethods, .getVariables, .toJSON

Methods inherited from Node

.findAncestor

Constructor Details

::constructor(node, fileName, lineMapping, options) Source

Construct a File object.

Parameters:

  • (Object) nodeThe class node (a Object)
  • (String) filenameA String representing the current filename
  • lineMappingAn object mapping the actual position of a member to its Biscotto one
  • optionsAny additional parser options

Instance Method Details

String ::getFileName() Source

Returns the file class name.

Returns:

  • (String) — Returns the file name without path as a String.

String ::getFullName() Source

Get the full file name with path

Returns:

  • (String) — Returns the file name with path as a String.

String ::getPath() Source

Get the file path

Returns:

  • (String) — Returns the file path as a String.

::isEmpty() Source

Test if the file doesn't contain any top-level public methods.

Returns:

  • Returns true if empty.

Object ::toJSON() Source

Get a JSON representation of the object

Returns:

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