Ruby provides the Enumerable#any? method to express this.
[code language=”ruby”]
words = ["test", "data", "boo", "rick"]
sentence = "xploralab.com is a test and boo"
words.any? { |word| sentence.include?(word) }
[/code]