class Bmi::BodyMassIndex

Attributes

height[R]
mass[R]

Public Class Methods

new(height, mass) click to toggle source
# File lib/bmi/ehiguera.rb, line 7
def initialize(height, mass)
        @height=height
        @mass=mass
end

Public Instance Methods

calculate_index() click to toggle source
# File lib/bmi/ehiguera.rb, line 12
def calculate_index
        mass/(height**2)
end