Skip to content

Instantly share code, notes, and snippets.

@stefanpenner
Forked from eqdw/stefanize.rb
Created April 21, 2011 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stefanpenner/935267 to your computer and use it in GitHub Desktop.
Save stefanpenner/935267 to your computer and use it in GitHub Desktop.
An extension that stef should always include
module Yehudalize
def method_missing(method_sym, *arguments, &block)
if method_sym.to_s =~ /^(?:omg_)?(.*)_to_me$/
send($1.to_sym, *arguments, &block)
else
super
end
end
end
Object.class_eval { include Yehudalize }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment