Created
May 17, 2013 14:10
-
-
Save ctford/5599269 to your computer and use it in GitHub Desktop.
Person class for week 10.
This file contains hidden or 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 | |
| def initialize(first_name, last_name, age) | |
| @first_name = first_name | |
| @last_name = last_name | |
| @age = age | |
| end | |
| def name() | |
| @first_name + " " + @last_name | |
| end | |
| def age() | |
| @age | |
| end | |
| def ==(other) | |
| other.name == name | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment