Module: Rubybody
- Defined in:
- lib/rubybody.rb,
lib/rubybody/person.rb,
lib/rubybody/version.rb,
lib/rubybody/formulas.rb,
lib/rubybody/nutrition.rb,
lib/rubybody/calculations.rb
Defined Under Namespace
Modules: Formulas Classes: Food, Person
Constant Summary collapse
- VERSION =
"0.0.3"
- PROTEIN_CALORIES =
4
- CARB_CALORIES =
4
- FAT_CALORIES =
9
- ALCOHOL_CALORIES =
7
Class Method Summary collapse
Class Method Details
.bmr(weight_in_kg, height_in_cm, age, gender, method) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/rubybody/calculations.rb', line 3 def self.bmr(weight_in_kg, height_in_cm, age, gender, method) case method.to_sym when :mifflin_st_jeor Formulas::mifflin_st_jeor(weight_in_kg, height_in_cm, age, gender) when :harris_benedict Formulas::harris_benedict(weight_in_kg, height_in_cm, age, gender) else raise "ArgumentError" end end |