Module: Nutriscore::UK::DrinksLessHealthy

Included in:
DrinksScore
Defined in:
lib/nutriscore/uk/concerns/drinks_less_healthy.rb

Instance Method Summary collapse

Instance Method Details

#less_healthy?Boolean

Returns:

  • (Boolean)


4
5
6
7
8
9
10
11
12
13
# File 'lib/nutriscore/uk/concerns/drinks_less_healthy.rb', line 4

def less_healthy?
  # 'A drink is classified as 'less healthy' where it scores 1 point or more.'
  if score.min >= 1
    true
  elsif score.max < 1
    false
  else
    nil
  end
end