debian-mirror-gitlab/app/helpers/dev_ops_report_helper.rb

19 lines
317 B
Ruby
Raw Normal View History

2018-12-05 23:21:45 +05:30
# frozen_string_literal: true
2020-11-24 15:15:51 +05:30
module DevOpsReportHelper
2017-09-10 17:25:29 +05:30
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