instance method
to_s
Ruby on Rails 4.2.9
Since v2.2.3 Last seen in v4.2.9Signature
to_s(options={})
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.
Parameters
-
optionsopt = {}
Source
# File railties/lib/rails/source_annotation_extractor.rb, line 41
def to_s(options={})
s = "[#{line.to_s.rjust(options[:indent])}] "
s << "[#{tag}] " if options[:tag]
s << text
end
Defined in railties/lib/rails/source_annotation_extractor.rb line 41
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in SourceAnnotationExtractor::Annotation