Class: BMI::JASSO

Inherits:
BMI
  • Object
show all
Includes:
CommonRisk
Defined in:
lib/bmi/jasso.rb

Constant Summary

Constants included from CommonRisk

CommonRisk::LOWER_LIMIT, CommonRisk::UPPER_LIMIT

Constants inherited from BMI

Japan, USA

Constants included from YABMI

YABMI::VERSION

Instance Method Summary collapse

Methods included from CommonRisk

#normal?, #obese?, #overweight?, #prime, #risk, #underweight?, #very_obese?

Methods inherited from BMI

#==, #bmi?, calc, #eql?, #hash, #index, #initialize, #inspect, #to_s

Constructor Details

This class inherits a constructor from BMI

Instance Method Details

#obese1?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/bmi/jasso.rb', line 9

def obese1?
  (25...30).cover?(@index)
end

#obese2?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/bmi/jasso.rb', line 13

def obese2?
  (30...35).cover?(@index)
end

#obese3?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/bmi/jasso.rb', line 17

def obese3?
  (35...40).cover?(@index)
end

#obese4?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/bmi/jasso.rb', line 21

def obese4?
  @index >= 40
end