method

handle

ruby latest stable - Class: RDoc::Markup::PreProcess

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2_2_9) is shown here.

handle(text, code_object = nil, &block)
public

Look for directives in the given text.

Options that we don’t handle are yielded. If the block returns false the directive is restored to the text. If the block returns nil or no block was given the directive is handled according to the registered directives. If a String was returned the directive is replaced with the string.

If no matching directive was registered the directive is restored to the text.

If code_object is given and the directive is unknown then the directive’s parameter is set as metadata on the code_object. See RDoc::CodeObject#metadata for details.