Created
July 6, 2010 14:48
-
-
Save sinefunc/465477 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
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