debian-mirror-gitlab/app/helpers/conversational_development_index_helper.rb
2018-12-05 23:21:45 +05:30

18 lines
335 B
Ruby

# frozen_string_literal: true
module ConversationalDevelopmentIndexHelper
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