Last active
April 14, 2016 09:10
-
-
Save dixpac/8affcc16fc016fbbffbd0e74c7607105 to your computer and use it in GitHub Desktop.
Calculate BMI hiding data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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