module Kernel

make the current method and the calling method available

http://www.ruby-forum.com/topic/75258
supposedly, this is fixed in 1.9

Private Instance Methods

calling_method() click to toggle source
# File lib/inline_forms.rb, line 164
def calling_method
  caller[1] =~ /`([^']*)'/ and $1
end
this_method() click to toggle source
# File lib/inline_forms.rb, line 161
def this_method
  caller[0] =~ /`([^']*)'/ and $1
end