Module: DevOpsReportHelper

Defined in:
app/helpers/dev_ops_report_helper.rb

Instance Method Summary collapse

Instance Method Details

#format_score(score) ⇒ Object


14
15
16
17
# File 'app/helpers/dev_ops_report_helper.rb', line 14

def format_score(score)
  precision = score < 1 ? 2 : 1
  number_with_precision(score, precision: precision)
end

#score_level(score) ⇒ Object


4
5
6
7
8
9
10
11
12
# File 'app/helpers/dev_ops_report_helper.rb', line 4

def score_level(score)
  if score < 33.33
    'low'
  elsif score < 66.66
    'average'
  else
    'high'
  end
end