Possible Duplicate:
check if value exists in array in Ruby
I have this method which loops through an array of strings and returns true if any string contains the string 'dog'. It is working, but the multiple return statements look messy. Is there a more eloquent way of doing this?
def has_dog?(acct)
[acct.title, acct.description, acct.tag].each do |text|
return true if text.include?("dog")
end
return false
end