Method: YARD::DocstringParser.after_parse

Defined in:
lib/yard/docstring_parser.rb

.after_parse {|parser| ... } ⇒ void

This method returns an undefined value.

Creates a callback that is called after a docstring is successfully parsed. Use this method to perform sanity checks on a docstring’s tag data, or add any extra tags automatically to a docstring.

Yields:

  • (parser)

    a block to be called after a docstring is parsed

Yield Parameters:

  • parser (DocstringParser)

    the docstring parser object with all directives and tags created.

Yield Returns:

  • (void)

Since:

  • 0.8.0



265
266
267
# File 'lib/yard/docstring_parser.rb', line 265

def self.after_parse(&block)
  after_parse_callbacks << block
end