Skip to content

Instantly share code, notes, and snippets.

@karthiks
Forked from michaelfeathers/gist:1855765
Created February 18, 2012 08:03
Show Gist options
  • Save karthiks/1858132 to your computer and use it in GitHub Desktop.
Save karthiks/1858132 to your computer and use it in GitHub Desktop.
Five lines that turn Ruby into a different language
class Object
def method_missing m, *args
Object.respond_to?(m, true) ? Object.send(m, self, *args) : super
end
end
@karthiks
Copy link
Author

@michaelfeathers tweeted the gist as "Five lines that turn Ruby into a different language". I guess, by language he meant DSL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment