I think I could rename `hash` to `document_attributes`.

I really don't like `map.with_object` because `with_object` means it's no longer a map operation. If you don't like my map implementation how about `reduce` or `each_with_object`?