class BodyMassIndex
Attributes
height[R]
mass[R]
Public Class Methods
new(mass, height)
click to toggle source
# File lib/body_mass_index.rb, line 4 def initialize(mass, height) @mass, @height = mass, height end
Public Instance Methods
calculate_index()
click to toggle source
# File lib/body_mass_index.rb, line 8 def calculate_index (mass / ( height ** 2 )).round(2) end