Equivalent python 'in' on ruby

Im new to ruby, and i want to try translate a code python to ruby.What would be a simple, and similarly on this.

print 'it has' if 'ten' in 'tentacle' else 'None'


ANSWERS:


Ruby String has method include? so it would be like:

print 'tentacle'.include?('ten') ? 'it has' : 'None'

If you're using rails, you can use 'in?':

puts 'ten'.in?('tentacle') ? 'it has' : 'None'


 MORE:


 ? Ruby Is a string present within another string (using a regexp)?
 ? How to count a string elements' occurrence in another string in ruby?
 ? Convert String to Regexp in Ruby
 ? Array includes string ruby?
 ? How do I check if a string contains a specific word?
 ? How do I check if a string contains a specific word?
 ? How do I check if a string contains a specific word?
 ? PHP - How to check if a string contain any text
 ? PHP - How to check if a string contain any text
 ? PHP - How to check if a string contain any text