Created
June 3, 2013 21:51
-
-
Save dallasmarlow/5701763 to your computer and use it in GitHub Desktop.
class instance state hash
This file contains hidden or 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
def instance_state_hash | |
self.instance_variables.map do |instance_variable| | |
self.instance_variable_get instance_variable.to_s.sub ':', '@' | |
end.hash | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment