README.md in tableware-0.1.3 vs README.md in tableware-0.2.0

- old
+ new

@@ -1,8 +1,8 @@ # Tableware -Tableware is a tiny gem for making it easier to define data in an text table. +Tableware is a tiny gem for making it easier to define data in a text table. Table rows are parsed into either arrays or hashes. For example: ```ruby @@ -25,18 +25,31 @@ { hero: 'Mercy', value: '9', hours_played: 11 }, { hero: 'Winston', value: '3', hours_played: 2 } ] ``` -Writing test data or a matrix of permissions in a big hash or nested array is fine, but it can be a pain to format at work with, especially for larger data setsa or with item of very different lengths. +Writing test data or a matrix of permissions in a big hash or nested array is fine, but it can be a pain to format and work with, especially for larger data sets or with items of very different lengths. Tableware lets you use a more human friendly format so that you can more easily scan and understand the data. The downside is that everything is treated as a string, so you may need to do some `.to_i`ing to convert things back into the type you're expecting. However, this is a one-time cost and [optimising for reading code is a good idea](http://va.lent.in/optimize-for-readability-first/). This isn't always going to be better than defining your data in another format, but it is another option. Or perhaps you just like Cucumber scenario outlines and want something similar in rspec! -This gem has been created as a quick experiment to see if or how ofen this feature could be useful. +You can also focus a single row, to help with debugging, by prepending a line with `>`. +For example: + +```ruby +words = ' Foo | Bar + > Yay | Woo + Zip | Zap ' + +Tableware.arrays(words) + #=> [ ['Yay', 'Woo'] ] +``` + + +This gem has been created as a quick experiment to see if or how often this feature could be useful. If you find it useful, please like it or better yet, extend it! ## Installation