Mega Code Archive

 
Categories / Ruby / String
 

Write an extension to the String class to provide it

class String   def vowels     self.scan(/[aeiou]/i)   end end puts "This is a test".vowels.join('-')