Created
November 24, 2015 09:08
-
-
Save yuroyoro/ecadf3cecedbd5297b04 to your computer and use it in GitHub Desktop.
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
class NilClass | |
def method_missing(method, *args) | |
case self.class | |
when Foo | |
# do something about foo is nil | |
when Bar | |
# do something about bar is nil | |
# ... | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment