write an extension to the String class to provide it : String class Extension String Ruby


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