Skip to content

Instantly share code, notes, and snippets.

@gusrub
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gusrub/9297476e9ca04892bfa0 to your computer and use it in GitHub Desktop.
Save gusrub/9297476e9ca04892bfa0 to your computer and use it in GitHub Desktop.
class Person
attr_accessor :first_name
attr_accessor :last_name
attr_accessor :dob
attr_reader :age
def initialize(first_name, last_name, dob)
self.first_name = first_name
self.last_name = last_name
self.dob = dob
end
def print_name
"My name is #{first_name} #{last_name}"
end
end
puts "Hello world!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment