1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Make Annotation into a proper class

This cleans up the documentation for SourceAnnotationExtractor because
RDoc does not seems to know how to parse `Struct.new() do` block.
This commit is contained in:
Prem Sichanugrist 2018-03-22 12:46:18 +00:00
parent 67cc450086
commit 1638d3c075

View file

@ -16,7 +16,7 @@ module Rails
# start with the tag optionally followed by a colon. Everything up to the end
# of the line (or closing ERB comment tag) is considered to be their text.
class SourceAnnotationExtractor
Annotation = Struct.new(:line, :tag, :text) do
class Annotation < Struct.new(:line, :tag, :text)
def self.directories
@@directories ||= %w(app config db lib test) + (ENV["SOURCE_ANNOTATION_DIRECTORIES"] || "").split(",")
end