refactored anagram.rb: inline variables same_letter_frequency?, count_letters method, attr_reader