Class: YARD::Tags::GroupDirective

Inherits:
Directive
  • Object
show all
Defined in:
lib/yard/tags/directives.rb

Overview

Note:

A group definition only applies to the scope it is defined in. If a new class or module is opened after the directive, this directive will not apply to methods in that class or module.

Defines a group listing. All methods (and attributes) seen after this directive are placed into a group with the given description as the group name. The group listing is used by templates to organize methods and attributes into respective logical groups. To end a group listing use @!endgroup.

Examples:

# @!group Callbacks

def before_filter; end
def after_filter; end

See Also:

Since:

  • 0.6.0

Instance Attribute Summary collapse

Parser callbacks collapse

Constructor Details

This class inherits a constructor from YARD::Tags::Directive

Instance Attribute Details

#expanded_textString? Originally defined in class Directive

Set this field to replace the directive definition inside of a docstring with arbitrary text. For instance, the MacroDirective uses this field to expand its macro data in place of the call to a @!macro.

Returns:

  • (String)

    the text to expand in the original docstring in place of this directive definition.

  • (nil)

    if no expansion should take place for this directive

Since:

  • 0.8.0

#handlerHandlers::Base? (readonly) Originally defined in class Directive

Returns the handler object the docstring parser might be attached to. May be nil. Only available when parsing through Parser::SourceParser.

Returns:

Since:

  • 0.8.0

#objectCodeObjects::Base? (readonly) Originally defined in class Directive

Returns the object the parent docstring is attached to. May be nil.

Returns:

  • (CodeObjects::Base, nil)

    the object the parent docstring is attached to. May be nil.

Since:

  • 0.8.0

#parserDocstringParser (protected) Originally defined in class Directive

Returns the parser that is parsing all tag information out of the docstring

Returns:

  • (DocstringParser)

    the parser that is parsing all tag information out of the docstring

Since:

  • 0.8.0

#tagTag Originally defined in class Directive

Returns the meta-data tag containing data input to the directive

Returns:

  • (Tag)

    the meta-data tag containing data input to the directive

Since:

  • 0.8.0

Instance Method Details

#callObject

Since:

  • 0.6.0



121
122
123
124
# File 'lib/yard/tags/directives.rb', line 121

def call
  return unless handler
  handler.extra_state.group = tag.text
end