Skip to Content Skip to Search
Methods
N
O

Attributes

[R] comments
[R] pattern

Class Public methods

new(source, pattern:)

# File railties/lib/rails/source_annotation_extractor.rb, line 22
def initialize(source, pattern:)
  super(source)
  @pattern = pattern
  @comments = []
end

Instance Public methods

on_comment(value)

# File railties/lib/rails/source_annotation_extractor.rb, line 28
def on_comment(value)
  @comments << Annotation.new(lineno, $1, $2) if value =~ pattern
end