Created
September 11, 2009 19:42
-
-
Save barrym/185522 to your computer and use it in GitHub Desktop.
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 | |
def initialize(first_name, last_name) | |
@first_name = first_name | |
@last_name = last_name | |
end | |
def full_name | |
@first_name + @last_name | |
end | |
def first_name | |
return @first_name | |
end | |
end | |
mark = Person.new("Mark", "Sorrell") | |
puts mark.full_name | |
puts mark.first_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment