Rubybody
Rubybody provides calculations like Total Daily Energy Expenditure (TDEE), Basal metabolic rate (BMR) and food calorie calculations
Formulas:
BMR: Basal Metabolic Rate TDEE: Total Daily Expenditure Estimate
Nutrition:
Protein: 4 calories per gram Carb: 4 calories per gram Fat: 9 calories per gram Alcohol: 7 calories per gram
Installation
Add this line to your application's Gemfile:
gem 'rubybody'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rubybody
Usage
# Height is in centimeters and weight is in kilograms
person = Rubybody::Person.new(81, 188, 25, :male)
person.bmr #=> 1816
person.tdee #=> 2180
food = Rubybody::Food.new(10,5,2)
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request