Methods
Attributes
[R] | comments | |
[R] | pattern |
Class Public methods
new(source, pattern:)
📝 Source code
# File railties/lib/rails/source_annotation_extractor.rb, line 38
def initialize(source, pattern:)
super(source)
@pattern = pattern
@comments = []
end
🔎 See on GitHub
Instance Public methods
on_comment(value)
📝 Source code
# File railties/lib/rails/source_annotation_extractor.rb, line 44
def on_comment(value)
@comments << Annotation.new(lineno, $1, $2) if value =~ pattern
end
🔎 See on GitHub