class Rubybody::Person
Attributes
activity[RW]
age[RW]
bodyfat[RW]
gender[RW]
height_in_cm[RW]
waist[RW]
weight_in_kg[RW]
Public Class Methods
new(weight_in_kg, height_in_cm, age, gender, activity=:sedentary, bodyfat=0, waist=0)
click to toggle source
All units are in the SI standard
# File lib/rubybody/person.rb, line 8 def initialize(weight_in_kg, height_in_cm, age, gender, activity=:sedentary, bodyfat=0, waist=0) self.weight_in_kg = weight_in_kg self.height_in_cm = height_in_cm self.age = age self.gender = gender self.activity = activity self.bodyfat = bodyfat self.waist = waist end
Public Instance Methods
bmr(method=:mifflin_st_jeor)
click to toggle source
# File lib/rubybody/person.rb, line 18 def bmr(method=:mifflin_st_jeor) Rubybody::bmr(weight_in_kg, height_in_cm, age, gender, method) end
tdee()
click to toggle source
# File lib/rubybody/person.rb, line 22 def tdee Rubybody::tdee(bmr, activity) end