Class: Yard::Lint::Parsers::TwoLineBase
- Defined in:
- lib/yard/lint/parsers/two_line_base.rb
Overview
Base class for all two line warnings parsers
Direct Known Subclasses
Validators::Warnings::DuplicatedParameterName::Parser, Validators::Warnings::UnknownParameterName::Parser
Instance Method Summary collapse
-
#call(yard_stats) ⇒ Array<Hash>
Array with all warnings informations from yard stats analysis.
Methods inherited from Base
Instance Method Details
#call(yard_stats) ⇒ Array<Hash>
Returns array with all warnings informations from yard stats analysis.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/yard/lint/parsers/two_line_base.rb', line 10 def call(yard_stats) # Not all the lines from the yard_stats output are valuable, that's why we filter # them out, preprocess and leave only those against which we should match rows = classify(yard_stats.split("\n")) rows.map do |warning| { name: self.class.to_s.split('::').last, message: match(warning[0], :message).last, location: match(warning[1], :location).last, line: match(warning[1], :line).last.to_i } end end |