Skip to content

Instantly share code, notes, and snippets.

@pasberth
Created November 6, 2011 02:36
Show Gist options
  • Save pasberth/1342378 to your computer and use it in GitHub Desktop.
Save pasberth/1342378 to your computer and use it in GitHub Desktop.
こういう定義すればいいのでは!?!?!?
# -*- 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