Skip to content

Instantly share code, notes, and snippets.

@richo
Last active December 14, 2015 08:59
Show Gist options
  • Save richo/5061389 to your computer and use it in GitHub Desktop.
Save richo/5061389 to your computer and use it in GitHub Desktop.
class Object
def method_missing(sym, *args)
method = methods.select do |m|
method(m).arity == args.length
end.sample
send(method, *args)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment