def content_and_headers_for_all_module_candidates(mod)
result = "Found #{mod.number_of_candidates} candidates for `#{mod.name}` definition:\n"
mod.number_of_candidates.times do |v|
candidate = mod.candidate(v)
begin
result << "\nCandidate #{v+1}/#{mod.number_of_candidates}: #{candidate.source_file} @ line #{candidate.source_line}:\n"
content = content_for(candidate)
result << "Number of lines: #{content.lines.count}\n\n" << content
rescue Pry::RescuableException
result << "\nNo content found.\n"
next
end
end
result
end