Skip to content

Instantly share code, notes, and snippets.

@mdarby
Created May 9, 2012 15:17
Show Gist options
  • Save mdarby/2645398 to your computer and use it in GitHub Desktop.
Save mdarby/2645398 to your computer and use it in GitHub Desktop.
class Person
attr_accessor :first_name, :last_name
def full_name
"#{first_name} #{last_name}"
end
end
matt = Person.new
matt.first_name = "Matt"
matt.last_name = "Darby"
puts matt.full_name
=> "Matt Darby"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment