Skip to content

Instantly share code, notes, and snippets.

@dixpac
Last active April 14, 2016 09:10
Show Gist options
  • Save dixpac/8affcc16fc016fbbffbd0e74c7607105 to your computer and use it in GitHub Desktop.
Save dixpac/8affcc16fc016fbbffbd0e74c7607105 to your computer and use it in GitHub Desktop.
Calculate BMI hiding data
class Person
attr_reader :weight, :height
def initialize(weight, height)
weight = weight
height = height
end
def bmi
(weight / (height * height))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment