Class File

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

Overview

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

Public: Construct a `File` object. node - The class node (a Object) filename - A String representing the current filename lineMapping - An object mapping the actual position of a member to its Biscotto one options - Any additional parser options

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

Public: Returns the file class name. Returns the file name without path as a String.

Returns:

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

String ::getFullName() Source

Public: Get the full file name with path Returns the file name with path as a String.

Returns:

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

String ::getPath() Source

Public: Get the file path Returns the file path as a String.

Returns:

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

::isEmpty() Source

Public: Test if the file doesn't contain any top-level public methods. Returns `true` if empty.

Returns:

  • Returns true if empty.

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