Class: LintTrap::Parser::Line
Overview
Handles parsing line by line with regex
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from LintTrap::Parser::Base
Instance Method Details
#parse ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/lint_trap/parser/line.rb', line 7 def parse output = '' io.each_line do |line| if (violation = parse_line(line)) yield violation else output << line end end output end |