| Class | YARD::Generators::Base |
| In: |
lib/yard/generators/base.rb
|
| Parent: | Object |
| current_object | [R] | |
| format | [R] | |
| ignore_serializer | [R] | |
| options | [R] | |
| serializer | [R] | |
| template | [R] | |
| verifier | [R] |
Calls the Proc object or method name before generating all or a specific section. The callback should return false if the section is to be skipped.
@overload before_section(method_name)
@param [Symbol] method_name the name of the method to call before
running the generator.
@overload before_section(proc)
@param [Proc] proc should return +false+ if section should be skipped.
@overload before_section(section, condition)
Only calls the +Proc+ or method if it matches the passed +section+
@param [Object] section one of the section items in {#sections_for}
@param [Symbol, Proc] condition see the first two overloads
Convenience method to registering a template path. Equivalent to calling:
GeneratorName.template_paths.unshift(path)
@param [String] path
the pathname to look for the template
@see template_paths
Creates a generator by adding extra options to the options hash.
@example [Creates a new MethodSummaryGenerator for public class methods]
G(MethodSummaryGenerator, :scope => :class, :visibility => :public)
@param [Class] generator
the generator class to use.
@option opts :ignore_serializer [Boolean] (true) whether or not the serializer is ignored.