Skip to content

Instantly share code, notes, and snippets.

@re5et
Created February 21, 2013 08:23
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 re5et/5003167 to your computer and use it in GitHub Desktop.
Save re5et/5003167 to your computer and use it in GitHub Desktop.
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