Class: Yard::Lint::Validators::Documentation::OrphanedDocComment::MessagesBuilder

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

Overview

Builds messages for orphaned documentation comment offenses

Class Method Summary collapse

Class Method Details

.call(offense) ⇒ String

Returns formatted message.

Parameters:

  • offense (Hash)

    offense data with :tags key

Returns:

  • (String)

    formatted message



13
14
15
16
# File 'lib/yard/lint/validators/documentation/orphaned_doc_comment/messages_builder.rb', line 13

def call(offense)
  tags = Array(offense[:tags]).join(', ')
  "Documentation comment with #{tags} is orphaned - YARD will ignore it"
end