Last active
December 13, 2015 20:49
-
-
Save az7arul/4973012 to your computer and use it in GitHub Desktop.
Object like Hash
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 H < Hash | |
def method_missing(m,*a); | |
m.to_s=~/=$/?self[$`]=a[0]:a==[]?self[m.to_s]:super | |
end | |
undef id, type if ?? == 63 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment