Class: YARD::Tags::EndGroupDirective

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

Overview

Ends a group listing definition. Group definition automatically end when class or module blocks are closed, and defining a new group overrides the last group definition, but occasionally you need to end the current group to return to the default listing. Use @!group to begin a group listing.

Examples:

class Controller
  # @!group Callbacks

  def before_filter; end
  def after_filter; end

  # @!endgroup

  def index; end
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

- (String?) expanded_text 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.

Since:

  • 0.8.0

- (Handlers::Base?) handler (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.

Since:

  • 0.8.0

- (CodeObjects::Base?) object (readonly) Originally defined in class Directive

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

Since:

  • 0.8.0

- (DocstringParser) parser (protected) Originally defined in class Directive

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

Since:

  • 0.8.0

- (Tag) tag Originally defined in class Directive

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

Since:

  • 0.8.0

Instance Method Details

- (Object) call

Since:

  • 0.6.0



98
99
100
101
# File 'lib/yard/tags/directives.rb', line 98

def call
  return unless handler
  handler.extra_state.group = nil
end