3
4
5
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/are_we_there_yet/formatter.rb', line 3
def self.format_for_output(data)
if data.first.has_key? :file
= %Q{"File Path","Average Execution Time"\n\n}
data.inject() do |output_string, metric_record|
output_string += %Q{"#{metric_record[:file]}",#{metric_record[:average_execution_time]}\n}
end
else
= %Q{"Example","Average Execution Time"\n\n}
data.inject() do |output_string, metric_record|
output_string += %Q{"#{metric_record[:example]}",#{metric_record[:average_execution_time]}\n}
end
end
end
|