Class: LintTrap::Parser::Line
Overview
Handles parsing line by line with regex
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#parse(io, container) ⇒ 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(io, container) output = '' io.each_line do |line| if (violation = parse_line(line, container)) yield violation else output << line end end output end |