champollion.directive.js_class

class champollion.directive.js_class.AutoClassDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

Directive to render Javascript class documentation.

The unique argument should be the identifier of the class element.

.. js:autoclass:: module.AwesomeClass

The available options are:

  • members:
    This option can be boolean if no arguments are given to indicate that all members should be documented, or a white list of member names to display.
  • skip-constructor:
    Indicate whether the constructor method should be displayed if available.
  • skip-attribute-value:
    Indicate whether attribute values within the class should be skipped.
  • undoc-members:
    Indicate whether members with no docstrings should be displayed.
  • private-members:
    Indicate whether private members (with a name starting with an underscore) should be displayed.
  • alias:
    String element to replace the class name.
  • module-alias:
    String element to replace the module name.
  • module-path-alias:
    String element to replace the module path.
  • force-partial-import:
    Indicate whether the class import statement display should be indicated with partial import if the class element is exported.

See also

Using autoclass

has_arguments = True

Javascript class is callable

objtype = 'class'

Define the Object type

option_spec = {'alias': <function unchanged_required>, 'force-partial-import': <function <lambda>>, 'members': <function _parse_members>, 'module-alias': <function unchanged_required>, 'module-path-alias': <function unchanged_required>, 'private-members': <function <lambda>>, 'skip-attribute-value': <function <lambda>>, 'skip-constructor': <function <lambda>>, 'undoc-members': <function <lambda>>}

classes options

handle_signature(signature, node)[source]

Update the signature node.

before_content()[source]

Update the content.

Compute the description and import statement if available, and generate the class nested directive elements to integrate to the content.

class champollion.directive.js_class.AutoMethodDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

Directive to render Javascript class method documentation.

The unique argument should be the identifier of the class method element.

.. js:automethod:: module.AwesomeClass.awesomeMethod

See also

Using automethod

has_arguments = True

Javascript method is callable

objtype = 'method'

Define the Object type

handle_signature(signature, node)[source]

Update the signature node.

before_content()[source]

Update the content.

Compute the description if available.

class champollion.directive.js_class.AutoAttributeDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

Directive to render Javascript class attribute documentation.

The unique argument should be the identifier of the class attribute element.

.. js:autoattribute:: module.AwesomeClass.DATA

The available options are:

  • skip-value:
    Indicate whether attribute value should be skipped.
has_arguments = False

Javascript data are not callable

objtype = 'attribute'

Define the Object type

option_spec = {'skip-value': <function <lambda>>}

data options

handle_signature(signature, node)[source]

Update the signature node.

before_content()[source]

Update the content.

Compute the description if available.