7.3.2.1.5. DispatcherDirective

class DispatcherDirective(name, arguments, options, content, lineno, content_offset, *args, **kwargs)[source]

Methods

__init__

add_name

Append self.options['name'] to node['names'] if it exists.

assert_has_content

Throw an ERROR-level DirectiveError if the directive doesn't have contents.

debug

directive_error

Return a DirectiveError suitable for being thrown as an exception.

error

get_location

Get current location info for logging.

get_source_info

Get source and line number.

info

run

set_source_info

Set source and line number to the node.

severe

warning

__init__(name, arguments, options, content, lineno, content_offset, *args, **kwargs)[source]

Attributes

config

Reference to the Config object.

env

Reference to the BuildEnvironment object.

final_argument_whitespace

May the final argument contain whitespace?

has_content

May the directive have content?

option_spec

Mapping of option names to validator functions.

optional_arguments

Number of optional arguments after the required arguments.

required_arguments

Number of required directive arguments.