Array::Formatter
A simple gem to reformat an array of arrays into one of several formats:
- HTML table (as a string)
- CSV string
- table (using fixed-width ASCII text or Unicode drawing characters)
- YAML string
Installation
Add this line to your application's Gemfile:
gem 'array-formatter'
And then execute:
$ bundle
Or install it yourself as:
$ gem install array-formatter
Usage
require 'array/formatter'
array.to_table :ascii
array.to_table :unicode
array.to_table :unicode_double
array.to_table :unicode_single
array.to_table :unicode_mixed
array.to_csv
array.to_html
array.to_yaml
Author:
Alan K. Stebbens [email protected]
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request