Sha256: ec1f107d2569b25236a1ba5b991928d5cb35b29ef952b9af476a012ae9e85432
Contents?: true
Size: 772 Bytes
Versions: 3
Compression:
Stored size: 772 Bytes
Contents
# tabler Tabler generates csv from an array of hashes. It will transform hashes with inconsistent keys into consistant tables. ## Installation ```bash gem install tabler ``` ## Usage ```ruby data = [ { :col1 => "val 1", :col2 => "val 2"}, { :col1 => "row 2 val 1", :col2 => "row 2 val 2"}, { :col1 => "row 3 val 1", :col3 => "row 3 val 3", :col2 => "row 3 val 2"}, { :col1 => "row 4 val 1", :col3 => "row 4 val 3" } ] Tabler.generate(data, :col_sep => ";") # => Generate the csv string ``` The string the above exaple will look like: ``` col1;col2;col3 val 1;val 2; row 2 val 1;row 2 val 2; row 3 val 1;row 3 val 3;row 3 val 2 row 4 val 1;;row 4 val 3 ``` ## Copyright Copyright (c) 2012 Klaas Speller. See LICENSE for details.
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tabler-0.0.3 | README.md |
tabler-0.0.2 | README.md |
tabler-0.0.1 | README.md |