Class: Yard::Lint::Validators::Warnings::SyntaxError::Result
- Inherits:
-
Results::Base
- Object
- Results::Base
- Yard::Lint::Validators::Warnings::SyntaxError::Result
- Defined in:
- lib/yard/lint/validators/warnings/syntax_error/result.rb
Overview
Result object for SyntaxError validation
Instance Attribute Summary
Attributes inherited from Results::Base
Instance Method Summary collapse
-
#build_message(offense) ⇒ String
Build human-readable message for a SyntaxError offense.
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 a SyntaxError offense
17 18 19 20 21 |
# File 'lib/yard/lint/validators/warnings/syntax_error/result.rb', line 17 def (offense) base = 'File could not be parsed by YARD and was skipped' detail = offense[:message] detail && !detail.empty? ? "#{base}: #{detail}" : base end |