windmillium/Code-Katas — comment on commit d6d21895231f6c6a6cea6ed253d4b05464081d69
File: 6/main.rb line 26
By windmillium:

This is an implementation detail, you are probably confused because you were expecting a hash from having built it with a hash. If you handed it to someone and said "this returns an array of anagrams" there would be no confusion because it is the interface which is important and the tests would cover the implementation. Also, this style of chaining methods together is fairly foreign to most OO developers as it is functional in nature. You could actually chain the whole method into a single line.

This is slightly easier to read:
```ruby
anagrams_with_letters = @hash.select {|letters,words| words.length > 1}
anagram_words = anagrams_with_letters.map{|a| a[1]}
```

You could also use an anagram class with the sorted letters and any words you can form in it.

Also, you read through these in backwards order.