方法
- N
- O
屬性
[R] | 註解 | |
[R] | 模式 |
類別公開方法
new(原始碼, pattern:) 連結
原始碼:顯示 | 在 GitHub 上
# File railties/lib/rails/source_annotation_extractor.rb, line 38 def initialize(source, pattern:) super(source) @pattern = pattern @comments = [] end
執行個體公開方法
on_comment(值) 連結
原始碼:顯示 | 在 GitHub 上
# File railties/lib/rails/source_annotation_extractor.rb, line 44 def on_comment(value) @comments << Annotation.new(lineno, $1, $2) if value =~ pattern end