Hi,
A Ruby question.
Anyone know a function that loops through an array and returns true if any one element satisfies the condition but false if none satisfy the condition? And it should do this in one line. Something like
any_bot_follower = followers.each {|f| return true if f.bot?}
The above returns an array if none of the Array elements satisfy the condition. I want it to return false instead.
I have seen a function somewhere that does this but just not able to nail it down. Hoping one of you here would know.
Thanks!