Class: Yard::Lint::Validators::Warnings::UnknownDirective::Result

Inherits:
Results::Base
  • Object
show all
Defined in:
lib/yard/lint/validators/warnings/unknown_directive/result.rb

Overview

Result object for UnknownDirective validation

Instance Attribute Summary

Attributes inherited from Results::Base

#config, #offenses

Instance Method Summary collapse

Methods inherited from Results::Base

#count, #each, #empty?, #initialize, #map, #validator_name

Constructor Details

This class inherits a constructor from Yard::Lint::Results::Base

Instance Method Details

#build_message(offense) ⇒ String

Build human-readable message for UnknownDirective offense

Parameters:

  • offense (Hash)

    offense data with :message key

Returns:

  • (String)

    formatted message



17
18
19
# File 'lib/yard/lint/validators/warnings/unknown_directive/result.rb', line 17

def build_message(offense)
  offense[:message] || 'UnknownDirective detected'
end