Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.