Deferred table header and column mappings #163
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'd like table header and column mappings to work with #rows_hash, treating the values in the left column as headers and the values in the right column as column values. In order to support this, I changed Table to defer execution of mappings until #hashes or #diff! is called so that the table can be transposed first if necessary. The only change I made to existing specs was to add a call to #hashes for those specs that expected a mapping to raise an error.
Sorry about the wire_protocol.feature change being part of this. I tried to back out a change from another issue, but can't seem to get it removed completely.