Skip to content

Instantly share code, notes, and snippets.

@bhaak
Created February 16, 2016 10:33
Show Gist options
  • Save bhaak/91428b9aee88ac50dd1d to your computer and use it in GitHub Desktop.
Save bhaak/91428b9aee88ac50dd1d to your computer and use it in GitHub Desktop.
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