class BodyMassIndex
Attributes
height[RW]
weight[RW]
Public Class Methods
new(weight, height)
click to toggle source
# File lib/bmi-marcoochoa28.rb, line 4 def initialize(weight, height) @weight=weight @height=height end
Public Instance Methods
calculate_index()
click to toggle source
# File lib/bmi-marcoochoa28.rb, line 9 def calculate_index @bmi = @weight / (@height * @height) puts 'El BMI es: '+ @bmi.to_s end