I always wondered if there is a converse method for include? . So, considering:
str = "a" ary = ["a", "b", "c"]
I can check if the string is in the array and not whether the array contains the string. Sort of:
str.in?(ary)
I canβt think of a situation where this is necessary, but often I think from this direction, and not vice versa.
source share