instance method
display
Ruby on Rails 8.1.2
Since v6.0.6Signature
display(results, options = {})
Prints the mapping from filenames to annotations in results ordered by filename. The options hash is passed to each annotation’s to_s.
Parameters
-
resultsreq -
optionsopt = {}
Source
# File railties/lib/rails/source_annotation_extractor.rb, line 207
def display(results, options = {})
options[:indent] = results.flat_map { |f, a| a.map(&:line) }.max.to_s.size
results.keys.sort.each do |file|
puts "#{file}:"
results[file].each do |note|
puts " * #{note.to_s(options).strip}"
end
puts
end
end
Defined in railties/lib/rails/source_annotation_extractor.rb line 207
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::SourceAnnotationExtractor