Skip to content

Instantly share code, notes, and snippets.

@apeiros
Created September 6, 2013 15:04
Show Gist options
  • Save apeiros/6465090 to your computer and use it in GitHub Desktop.
Save apeiros/6465090 to your computer and use it in GitHub Desktop.
class Object
def class_call(*args, &block)
self.class.__send__(caller_locations(1,1).first.label, *args, &block)
end
end
class Foo
def self.bar
"bar"
end
def bar
class_call
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment