Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/find_vowels.rb
Instance Method Summary collapse
Instance Method Details
#uniq_vowels ⇒ Object
13 14 15 |
# File 'lib/find_vowels.rb', line 13 def uniq_vowels scan(/[aeiou]/i).uniq end |
#vowels ⇒ Object
9 10 11 |
# File 'lib/find_vowels.rb', line 9 def vowels scan(/[aeiou]/i) end |
#vowels_count ⇒ Object
17 18 19 20 |
# File 'lib/find_vowels.rb', line 17 def vowels_count arr = scan(/[aeiou]/i) arr.each_with_object(Hash.new(0)) { |e, hash| hash[e] += 1 } end |