Type:
Class

Implements the logic behind the rake tasks for annotations like

1
2
rake notes
rake notes:optimize

and friends. See rake -T notes and railties/lib/tasks/annotations.rake.

Annotation objects are triplets :line, :tag, :text that represent the line where the annotation lives, its tag, and its text. Note the filename is not stored.

Annotations are looked for in comments and modulus whitespace they have to 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.

display
  • References/Ruby on Rails/Rails/Classes/SourceAnnotationExtractor

display(results, options={}) Instance Public methods Prints the mapping from

2025-01-10 15:47:30
new
  • References/Ruby on Rails/Rails/Classes/SourceAnnotationExtractor

new(tag) Class Public methods

2025-01-10 15:47:30
enumerate
  • References/Ruby on Rails/Rails/Classes/SourceAnnotationExtractor

enumerate(tag, options={}) Class Public methods Prints all annotations with

2025-01-10 15:47:30
directories
  • References/Ruby on Rails/Rails/Classes/SourceAnnotationExtractor/SourceAnnotationExtractor::Annotation

directories() Class Public methods

2025-01-10 15:47:30
find
  • References/Ruby on Rails/Rails/Classes/SourceAnnotationExtractor

find(dirs) Instance Public methods Returns a hash that maps filenames under

2025-01-10 15:47:30
find_in
  • References/Ruby on Rails/Rails/Classes/SourceAnnotationExtractor

find_in(dir) Instance Public methods Returns a hash that maps filenames under

2025-01-10 15:47:30
extract_annotations_from
  • References/Ruby on Rails/Rails/Classes/SourceAnnotationExtractor

extract_annotations_from(file, pattern) Instance Public methods If file

2025-01-10 15:47:30
to_s
  • References/Ruby on Rails/Rails/Classes/SourceAnnotationExtractor/SourceAnnotationExtractor::Annotation

to_s(options={}) Instance Public methods Returns a representation of the annotation

2025-01-10 15:47:30