Skip to content

Instantly share code, notes, and snippets.

@d3chapma
Created August 2, 2016 20:42
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 d3chapma/92536b1838f1a92fda5b8cc2dda6dbfd to your computer and use it in GitHub Desktop.
Save d3chapma/92536b1838f1a92fda5b8cc2dda6dbfd to your computer and use it in GitHub Desktop.
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