Module Index

Class: ModuleDoc

Represents the top-level fileoverview documentation.

Methods

get (self, tag_name, default='')

Return the value of a particular tag, or None if that tag doesn't exist. Use 'doc' for the comment body itself.

get_as_list (self, tag_name)

Return the value of a tag, making sure that it's a list. Absent tags are returned as an empty-list; single tags are returned as a one-element list.

The returned list is a copy, and modifications do not affect the original object.

to_dict (self)

Return this ModuleDoc as a dict. In addition to CommentDoc defaults, this has:

  • name: The module name.
  • dependencies: A list of immediate dependencies.
  • all_dependencies: A list of all dependencies.

to_html (self, codebase)

Convert this to HTML.

to_json (self)

Return a JSON representation of the CommentDoc. Keys are as per to_dict.

Properties

author

Read only

Return the author of this module, as a string.

dependencies

Read only

Returns the immediate dependencies of a module (only those that are explicitly declared). Use the all_dependencies field for transitive dependencies - the FileDoc must have been created by a CodeBaseDoc for this field to exist.

>>> FileDoc('', read_file('examples/module_closure.js')).module.dependencies
['module.js']
>>> FileDoc('subclass.js', read_file('examples/subclass.js')).module.dependencies
['module_closure.js', 'class.js']

doc

Read only

Return the comment body.

license

Read only

Return the license of this module, as as string.

name

Read only

Always return 'file_overview'.

organization

Read only

Return the organization that developed this, as as string.

see

Read only

Return a list of all @see tags on the comment.

url

Read only

Return a URL for the comment, within the page.

version

Read only

Return the version of this module, as as string.