class CalculaBmi
Attributes
height[R]
weight[R]
Public Class Methods
new(weight, height)
click to toggle source
# File lib/calcula_bmi.rb, line 4 def initialize(weight, height) @weight = weight @height = height end
Public Instance Methods
calculate_index()
click to toggle source
# File lib/calcula_bmi.rb, line 9 def calculate_index (weight/( height * height )).round(2) #dos decimales end