ruby/anagrams.rb
def char_count(string)
	char_count = Hash.new
	"abcdefghijklmnopqrstuvwxyz".chars.each {|char| char_count[char] = 0}
	string.chars.each {|char| char_count[char] += 1}
	char_count
end
# this code works well, methods could be extracted out to make it more single responsibility
this code works well, methods could be extracted out to make it more single responsibility
this code works well methods could be extracted out to make it more single responsibility
def char_count(string)
	char_count = Hash.new
	"abcdefghijklmnopqrstuvwxyz".chars.each {|char| char_count[char] = 0}
	string.chars.each {|char| char_count[char] += 1}
	char_count
end
def char_count ( string ) char_count = Hash . new "abcdefghijklmnopqrstuvwxyz" . chars . each { | char | char_count [ char ] = 0 } string . chars . each { | char | char_count [ char ] += 1 } char_count end
this code works well, methods could be extracted out to make it more single responsibility
this code works well methods could be extracted out to make it more single responsibility
string