instance method display

Ruby on Rails 6.1.7.10

Since v6.0.6

Available in: v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

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

results req
options opt = {}
Source
# File railties/lib/rails/source_annotation_extractor.rb, line 137
    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)}"
        end
        puts
      end
    end

Defined in railties/lib/rails/source_annotation_extractor.rb line 137 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::SourceAnnotationExtractor

Type at least 2 characters to search.

↑↓ navigate · open · esc close