svmartin
5/18/2016 - 7:37 PM

count_characters.rb

statement = "The Flintstones Rock".delete(" ")
statement_hash = {}
statement.each_char do |character|
  statement_hash[character] = statement.scan(character).count
end