Created
November 6, 2011 02:36
-
-
Save pasberth/1342378 to your computer and use it in GitHub Desktop.
こういう定義すればいいのでは!?!?!?
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
# -*- coding: utf-8 -*- | |
module Kernel | |
alias m_original_method_missing method_missing | |
def method_missing funcname, *args, &blk | |
if funcname.to_s =~ /^(.*?)nnn(.*?)$/ | |
m_funcname = "#{$1}nn#{$2}" | |
puts "もしかして: #{m_funcname}" | |
puts caller | |
send m_funcname, *args, &blk | |
else | |
m_original_method_missing funcname, *args, blk | |
end | |
end | |
end | |
def innerHTML | |
puts "called innerHTML" | |
end | |
innnerHTML |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment