来源: 显示 | 在GitHub上
# File railties/lib/rails/source_annotation_extractor.rb, line 38 def initialize(source, pattern:) super(source) @pattern = pattern @comments = [] end
# File railties/lib/rails/source_annotation_extractor.rb, line 44 def on_comment(value) @comments << Annotation.new(lineno, $1, $2) if value =~ pattern end