Method: YARD::Handlers::Processor#find_handlers

Defined in:
lib/yard/handlers/processor.rb

#find_handlers(statement) ⇒ Array<Base>

Searches for all handlers in Base.subclasses that match the statement

Parameters:

  • statement

    the statement object to match.

Returns:

  • (Array<Base>)

    a list of handlers to process the statement with.


152
153
154
155
156
157
158
# File 'lib/yard/handlers/processor.rb', line 152

def find_handlers(statement)
  Base.subclasses.find_all do |handler|
    handler_base_class > handler &&
    (handler.namespace_only? ? owner.is_a?(CodeObjects::NamespaceObject) : true) &&
    handler.matches_file?(file) && handler.handles?(statement)
  end
end