Last active
August 29, 2015 14:13
-
-
Save gusrub/9297476e9ca04892bfa0 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 | |
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 |
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
puts "Hello world!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment