Skip to content

Instantly share code, notes, and snippets.

@vangberg
Created May 26, 2009 15:20
Show Gist options
  • Save vangberg/118108 to your computer and use it in GitHub Desktop.
Save vangberg/118108 to your computer and use it in GitHub Desktop.
mc = class << self; self; end
mc.send :define_method, :__my_method, &block
# this
__my_method(arg, barg, carg)
# or that
send :__my_method, arg, barg, carg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment