class YARD::Tags::Directive

The base directive class. Subclass this class to create a custom directive, registering it with {Library.define_directive}. Directive classes are executed via the {#call} method, which perform all directive processing on the object.

If processing occurs within a handler, the {#handler} attribute is available to access more information about parsing context and state. Handlers are only available when parsing from {Parser::SourceParser}, not when parsing directly from {DocstringParser}. If the docstring is attached to an object declaration, {#object} will be set and available to modify the generated code object directly. Note that both of these attributes may be nil, and directives should test their existence before attempting to use them.

@abstract Subclasses should implement {#call}. @see Library.define_directive @since 0.8.0