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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request