2018-08-18 07:19:57 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-09-10 14:08:54 -04:00
|
|
|
module DevOpsReportHelper
|
2017-05-24 06:25:44 -04:00
|
|
|
def score_level(score)
|
|
|
|
if score < 33.33
|
|
|
|
'low'
|
|
|
|
elsif score < 66.66
|
|
|
|
'average'
|
|
|
|
else
|
|
|
|
'high'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def format_score(score)
|
|
|
|
precision = score < 1 ? 2 : 1
|
|
|
|
number_with_precision(score, precision: precision)
|
|
|
|
end
|
|
|
|
end
|