Created
August 26, 2010 23:55
-
-
Save jgagner/552495 to your computer and use it in GitHub Desktop.
Revisions
-
jgagner created this gist
Aug 26, 2010 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ #mostly pseudo-code #LOLOLOL class Module alias_method :old_method_missing, :method_missing def method_missing(methId) methods = methId.split("_") tmp = self while methods.size > 0 my_meth = methods.pop if tmp.respond_to?(my_meth) tmp = tmp.send(my_meth) else old_method_missing(methId) end end end end