Class Ruby

class Object
  def in(other)
    other.include? self
  end
end
x = [1, 2, 3]
if 2.in x
  puts "yes"     # Prints "yes"
else
  puts "no"
end