Method: OrExpression#evaluate
- Defined in:
- lib/glark/match/or.rb
#evaluate(line, lnum, file, formatter) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/glark/match/or.rb', line 10 def evaluate line, lnum, file, formatter matched_ops = @ops.select do |op| op.evaluate line, lnum, file, formatter end if is_match? matched_ops lastmatch = matched_ops[-1] @last_start = lastmatch.start_position @last_end = lastmatch.end_position @match_line_number = lnum add_match lnum true else false end end |