Module: Yard::Lint::Validators::Documentation::UndocumentedBooleanMethods

Defined in:
lib/yard/lint/validators/documentation/undocumented_boolean_methods.rb,
lib/yard/lint/validators/documentation/undocumented_boolean_methods/config.rb,
lib/yard/lint/validators/documentation/undocumented_boolean_methods/parser.rb,
lib/yard/lint/validators/documentation/undocumented_boolean_methods/result.rb,
lib/yard/lint/validators/documentation/undocumented_boolean_methods/validator.rb

Overview

UndocumentedBooleanMethods validator

Ensures that boolean methods (methods ending with ‘?`) have an explicit `@return [Boolean]` tag. Boolean methods should clearly document that they return true or false values. This validator is enabled by default.

## Configuration

To disable this validator:

Documentation/UndocumentedBooleanMethods:
  Enabled: false

Examples:

Bad - Missing @return tag on boolean method

# Checks if the user is active
def active?
  @active
end

Good - Boolean return documented

# Checks if the user is active
# @return [Boolean] true if the user is active
def active?
  @active
end

Defined Under Namespace

Classes: Config, Parser, Result, Validator