geemus/formatador — pull request #9 by lodestone (2012-05-16 16:54:28+00:00)
Title: Adds automatic dereferencing of nested hash values to table display

First off, this is my first pull request of this sort, so if I've screwed up let me know.

This pull request adds automatic dereferencing of nested hash values to table display, which is to say:

data = [{:person => {:head => {:eyes => :green} } }]
Formatador.display_table(data, [:"person.head.eyes"])
+------------------+
| person.head.eyes |
+------------------+
| green |
+------------------+

I had trouble getting one of the tests to pass -- despite it actually working when you run the code, I couldn't figure out how to get the test to pass properly. The test is in the test file, just commented out.

I hope you find this valuable, as I certainly have.

-Matt