Created
February 21, 2013 08:23
-
-
Save re5et/5003167 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 Foo | |
# always works | |
def read_instance_property | |
bar | |
end | |
# assigns thing, but not Foo instance thing | |
def write_instance_property | |
thing = 'baz' | |
end | |
# assigns foo instance thing | |
def really_write_instance_property | |
self.thing = 'baz' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment