Created
December 10, 2010 22:14
-
-
Save richardiux/736911 to your computer and use it in GitHub Desktop.
Revisions
-
richardiux renamed this gist
Dec 10, 2010 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
richardiux created this gist
Dec 10, 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,13 @@ class A def method_missing(method_sym, *arguments, &block) if method_sym == :[] && arguments.first.is_a?(Integer) # do something here with value (search something or create) arguments.first else super end end end a = A.new a[2]