module Countvowels

Constants

VERSION

Public Class Methods

count_vowels(string) click to toggle source
# File lib/countvowels.rb, line 4
def self.count_vowels(string)
  arr = string.split("").keep_if do |x|
      x =~ /[aeiou]/
  end
return arr.length
end