Skip to content

Instantly share code, notes, and snippets.

@ctford
Created May 17, 2013 14:10
Show Gist options
  • Select an option

  • Save ctford/5599269 to your computer and use it in GitHub Desktop.

Select an option

Save ctford/5599269 to your computer and use it in GitHub Desktop.
Person class for week 10.
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