Created
April 19, 2013 12:16
-
-
Save nirname/5419973 to your computer and use it in GitHub Desktop.
Delegates all method to target
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def method_missing(method_name, *arguments, &block) | |
return target.send(method_name, *arguments, &block) if target.respond_to? method_name | |
super | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment