Class: Doc

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

Overview

A documentation node is responsible for parsing the comments for known tags.

Instance Method Summary

Inherited Method Summary

Methods inherited from Node

.findAncestor

Constructor Details

::constructor(node, options) Source

Construct a documentation node.

Parameters:

  • (Object) nodeThe comment node (a Object)
  • (Object) optionsThe parser options (a Object)

Instance Method Details

Boolean ::hasComment() Source

Determines if the current doc has some comments

Returns:

  • (Boolean) — Returns the comment status (a Boolean).

Boolean ::isInternal() Source

Is this doc internal?

Returns:

Boolean ::isPrivate() Source

Is this doc private?

Returns:

Boolean ::isPublic() Source

Is this doc public?

Returns:

::leftTrimBlock(lines) Source

Detect whitespace on the left and removes the minimum whitespace ammount.

Examples:

Parameters:

  • (String) linesThe comment lines [String]

::parseBlock(lines) Source

Parse the given lines as TomDoc and adds the result to the result object.

::parse_arguments(section) Source

Parse the member's arguments. Arguments occur subsequent to the description.

Parameters:

  • (String) sectionA String containing the argument definitions.

Returns:

  • Returns nothing.

::parse_description(section) Source

Parse the member description.

Parameters:

  • (String) sectionThe section String containing a description.

Returns:

  • Returns nothing.

::parse_examples(section, sections) Source

Parse the member examples.

Parameters:

  • (String) sectionThe section String starting with "Examples"
  • sectionsAll sections subsequent to section.

Returns:

  • Returns nothing.

::parse_returns(section) Source

Parse the member's return values.

Parameters:

  • (String) sectionThe section String starting with "Returns"

Returns:

  • Returns nothing.

Object ::toJSON() Source

Get a JSON representation of the object.

Returns:

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