rework anagram in ruby to use a value object