Sha256: 933ad97384bc67801730a483e4b49b37d8854cd53ef1ef72412d201eb4401fff
Contents?: true
Size: 443 Bytes
Versions: 14
Compression:
Stored size: 443 Bytes
Contents
module DeepCover module Tools::Format CONVERT = Hash.new(' ') CONVERT[0] = 'x ' CONVERT[nil] = '- ' def format(*results, filename: nil, source: nil) source ||= File.read(filename) results.map!{|counts| counts.map{|c| CONVERT[c]}} [*results, source.lines].transpose.map do |parts| *line_results, line = parts Term::ANSIColor.white(line_results.join) + line.to_s end end end end
Version data entries
14 entries across 14 versions & 1 rubygems