module Rubybody

Constants

ALCOHOL_CALORIES
CARB_CALORIES
FAT_CALORIES
PROTEIN_CALORIES
VERSION

Public Class Methods

bmr(weight_in_kg, height_in_cm, age, gender, method) click to toggle source
# 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
tdee(bmr, activity_level) click to toggle source
# File lib/rubybody/calculations.rb, line 14
def self.tdee(bmr, activity_level)
  Formulas::typical(bmr, activity_level)
end