Created
February 16, 2016 10:33
-
-
Save bhaak/91428b9aee88ac50dd1d 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 Object | |
def ∈(enumerable) | |
enumerable.include? self | |
end | |
def ∉(enumerable) | |
!∈(enumerable) | |
end | |
end | |
array = [1,2,3] | |
puts 2.∈ array | |
puts 2.∉ array | |
puts 4.∈ array | |
puts 4.∉ array |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment