Skip to content

Instantly share code, notes, and snippets.

@marugoshi
Created May 16, 2010 16:28
Show Gist options
  • Save marugoshi/402976 to your computer and use it in GitHub Desktop.
Save marugoshi/402976 to your computer and use it in GitHub Desktop.
module Ext
module Object
def self.included(base)
base.class_eval do
include InstanceMethods
end
end
module InstanceMethods
def current_method
self.name + "." + caller.first.scan(/`(.*)'/).to_s
end
end
end
end
Object.send :include, Ext::Object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment