method

read_directive

v2_2_9 - Show latest stable - Class: RDoc::Parser::Ruby
read_directive(allowed)
public

Directives are modifier comments that can appear after class, module, or method names. For example:

def fred # :yields: a, b

or:

class MyClass # :nodoc:

We return the directive name and any parameters as a two element array if the name is in allowed. A directive can be found anywhere up to the end of the current line.