You don't need `each` when you do `map`. Also the ruby style guide prescribes `|hook|` without the inner spaces.