Method: YARD::CLI::Stats#print_undocumented_objects
- Defined in:
- lib/yard/cli/stats.rb
#print_undocumented_objects ⇒ Object
Prints list of undocumented objects
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/yard/cli/stats.rb', line 79 def print_undocumented_objects return if !@undoc_list || @undoc_list.empty? log.puts log.puts "Undocumented Objects:" # array needed for sort due to unstable sort objects = @undoc_list.sort_by {|o| [o.file.to_s, o.path] } max = objects.max {|a, b| a.path.length <=> b.path.length }.path.length if @compact objects.each do |object| log.puts("%-#{max}s (%s)" % [object.path, [object.file || "-unknown-", object.line].compact.join(":")]) end else last_file = nil objects.each do |object| if object.file != last_file log.puts log.puts "(in file: #{object.file || "-unknown-"})" end log.puts object.path last_file = object.file end end end |