method
annotations
v7.1.3.2 -
Show latest stable
- Class:
Rails::SourceAnnotationExtractor::ParserExtractor
annotations(file)public
No documentation available.
# File railties/lib/rails/source_annotation_extractor.rb, line 33
def annotations(file)
contents = File.read(file, encoding: Encoding::BINARY)
parser = Parser.new(contents, pattern: pattern).tap(&:parse)
parser.error? ? [] : parser.comments
end