Class: Yard::Lint::Validators::Semantic::AbstractMethods::MessagesBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/yard/lint/validators/semantic/abstract_methods/messages_builder.rb

Overview

Builds messages for abstract method offenses

Class Method Summary collapse

Class Method Details

.call(offense) ⇒ String

Build message for abstract method offense

Parameters:

  • offense (Hash)

    offense data with :method_name key

Returns:

  • (String)

    formatted message



15
16
17
18
# File 'lib/yard/lint/validators/semantic/abstract_methods/messages_builder.rb', line 15

def call(offense)
  "Abstract method `#{offense[:method_name]}` has implementation " \
    '(should only raise NotImplementedError or be empty)'
end