Last active
August 29, 2015 14:03
-
-
Save bricker/572749fab3f8c5af9e95 to your computer and use it in GitHub Desktop.
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 User | |
| def initialize(firstName, lastName) | |
| @firstName = firstName | |
| @lastName = lastName | |
| end | |
| def firstName() | |
| return @firstName | |
| end | |
| def lastName() | |
| return @lastName | |
| end | |
| def fullName() | |
| return "%s %s" % [@firstName, @lastName] | |
| end | |
| end | |
| user = User.new("Bryan", "Ricker") | |
| user.fullName() #=> "Bryan Ricker" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment