Skip to content

Instantly share code, notes, and snippets.

@barrym
Created September 11, 2009 19:42
Show Gist options
  • Save barrym/185522 to your computer and use it in GitHub Desktop.
Save barrym/185522 to your computer and use it in GitHub Desktop.
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