class Rails::SourceAnnotationExtractor::ParserExtractor

file’s comments.
Wraps a regular expression that will be tested against each of the source

def annotations(file)

def annotations(file)
  contents = File.read(file, encoding: Encoding::BINARY)
  parser = Parser.new(contents, pattern: pattern).tap(&:parse)
  parser.error? ? [] : parser.comments
end