Module: Yard::Lint::Validators::Semantic::AbstractMethods

Defined in:
lib/yard/lint/validators/semantic/abstract_methods.rb,
lib/yard/lint/validators/semantic/abstract_methods/config.rb,
lib/yard/lint/validators/semantic/abstract_methods/parser.rb,
lib/yard/lint/validators/semantic/abstract_methods/result.rb,
lib/yard/lint/validators/semantic/abstract_methods/validator.rb,
lib/yard/lint/validators/semantic/abstract_methods/messages_builder.rb

Overview

AbstractMethods validator

Ensures that methods marked with ‘@abstract` are actually abstract (not implemented). Abstract methods should either raise NotImplementedError or be empty stubs, not contain actual implementation logic. This validator is enabled by default.

## Configuration

To disable this validator:

Semantic/AbstractMethods:
  Enabled: false

Examples:

Bad - @abstract tag on implemented method

# @abstract
def process
  puts "This is actually implemented!"
end

Good - @abstract method raises NotImplementedError

# @abstract
def process
  raise NotImplementedError
end

Good - @abstract method is empty

# @abstract
def process
end

Defined Under Namespace

Classes: Config, MessagesBuilder, Parser, Result, Validator