class GemaPeso
Attributes
altura[RW]
peso[RW]
Public Class Methods
new(peso, altura)
click to toggle source
# File lib/bmi-Gionani.rb, line 4 def initialize(peso, altura) @weight=peso @height=altura end
Public Instance Methods
calcularpeso()
click to toggle source
# File lib/bmi-Gionani.rb, line 9 def calcularpeso @masa = @weight / (@height * @height) puts 'Su masa corporal es: '+ @masa.to_s end