Skip to content

Instantly share code, notes, and snippets.

@sinefunc
Created July 6, 2010 14:48
Show Gist options
  • Save sinefunc/465477 to your computer and use it in GitHub Desktop.
Save sinefunc/465477 to your computer and use it in GitHub Desktop.
Person.key(:custom) # previous version
Person.key[:custom] # new version
# At this point it doesn't seem ground breaking, but when we want to do
# operations on it, the change will be more apparent.
# Code like this:
Person.db.sadd Person.key(:my_custom_set), 1
# will be much cleaner, and now look like:
Person.key[:my_custom_set].sadd(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment