Class SourceAnnotationExtractor::Annotation
In: vendor/rails/railties/lib/source_annotation_extractor.rb
Parent: Struct.new(:line, :tag, :text)

Methods

to_s  

Public Instance methods

Returns a representation of the annotation that looks like this:

  [126] [TODO] This algorithm is simple and clearly correct, make it faster.

If options has a flag :tag the tag is shown as in the example above. Otherwise the string contains just line and text.

[Source]

    # File vendor/rails/railties/lib/source_annotation_extractor.rb, line 24
24:     def to_s(options={})
25:       s = "[%3d] " % line
26:       s << "[#{tag}] " if options[:tag]
27:       s << text
28:     end

[Validate]