class Rails::SourceAnnotationExtractor::PatternExtractor

test each one for the given pattern.
Wraps a regular expression that will iterate through a file’s lines and

def annotations(file)

def annotations(file)
  lineno = 0
  File.readlines(file, encoding: Encoding::BINARY).inject([]) do |list, line|
    lineno += 1
    next list unless line =~ pattern
    list << Annotation.new(lineno, $1, $2)
  end
end