方法
- N
- O
属性
[R] | comments | |
[R] | pattern |
类公共方法
new(source, pattern:) 链接
源代码: 显示 | 在 GitHub 上
# File railties/lib/rails/source_annotation_extractor.rb, line 22 def initialize(source, pattern:) super(source) @pattern = pattern @comments = [] end
实例公共方法
on_comment(value) 链接
源代码: 显示 | 在 GitHub 上
# File railties/lib/rails/source_annotation_extractor.rb, line 28 def on_comment(value) @comments << Annotation.new(lineno, $1, $2) if value =~ pattern end