Method: YARD::Tags::Library.default_factory=

Defined in:
lib/yard/tags/library.rb

.default_factory=(factory) ⇒ Object

Replace the factory object responsible for parsing tags by setting this to an object (or class) that responds to parse_TAGNAME methods where TAGNAME is the name of the tag.

You should set this value before performing any source parsing with YARD, otherwise your factory class will not be used.

Examples:

YARD::Tags::Library.default_factory = MyFactory

Parameters:

  • factory (Class, Object)

    the factory that parses all tags

See Also:


68
69
70
# File 'lib/yard/tags/library.rb', line 68

def default_factory=(factory)
  @default_factory = factory.is_a?(Class) ? factory.new : factory
end