Created
January 4, 2012 08:24
-
-
Save mana8626/1559086 to your computer and use it in GitHub Desktop.
method missing実装してみたった!
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
class Ms | |
def method_missing name, *args, &blk | |
case name.to_s | |
when /^find_(.*)$/ | |
puts $1 | |
else | |
super | |
end | |
end | |
end | |
ms = Ms.new | |
ms.aaa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment