class SimpleCov::Result
def source_file_for(path)
SimpleCov.root, so callers can pass either an absolute path or a
matching file is in this result. The path is resolved against
Returns the SimpleCov::SourceFile for the given path, or nil if no
def source_file_for(path) target = File.expand_path(path, SimpleCov.root) files.find { |file| file.filename == target } end