Created
August 2, 2016 20:42
-
-
Save d3chapma/92536b1838f1a92fda5b8cc2dda6dbfd to your computer and use it in GitHub Desktop.
This file contains hidden or 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_reader :name | |
def initialize(name:) | |
@name = name | |
end | |
end | |
test = "My String" | |
person = Person.new(name: test) | |
test.object_id #=> 70351787063920 | |
person.name.object_id #=> 70351787063920 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment