17 lines
304 B
Ruby
17 lines
304 B
Ruby
|
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
|