Skip to content

Instantly share code, notes, and snippets.

@maxdignan
Last active June 3, 2016 18:29
Show Gist options
  • Save maxdignan/a75336c98ee072c64af444d94d93b82d to your computer and use it in GitHub Desktop.
Save maxdignan/a75336c98ee072c64af444d94d93b82d to your computer and use it in GitHub Desktop.
Ruby Existential Check
class Object
def QQ
if !self.nil?
return self
end
Qe.new
end
end
class Qe
def method_missing(m, *args, &block)
nil
end
end
@maxdignan
Copy link
Author

I can't get the tabbing to update on Github. Sorry.

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