I\'ve got the following logic in my code:
if !@players.include?(p.name)
...
end
@players is an array. Is there a method so
I was looking up on this for myself, found this, and then a solution. People are using confusing methods and some methods that don't work in certain situations or not at all.
I know it's too late now, considering this was posted 6 years ago, but hopefully future visitors find this (and hopefully, it can clean up their, and your, code.)
Simple solution:
if not @players.include?(p.name) do
....
end