No commit activity in last 3 years
No release in over 3 years
Monkey patch terminal-table to generate table from array of hashes
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.14
~> 5.0
~> 10.0

Runtime

>= 1.7.3, ~> 1.7
 Project Readme

terminal-tableofhashes

Monkey patch terminal-table to generate table from array of hashes

Installation

Add this line to your application's Gemfile:

gem 'terminal-tableofhashes'

And then execute:

$ bundle

Or install it yourself as:

$ gem install terminal-tableofhashes

Usage

array_of_hashes = [{a: 1, b: 2}, {b: 3, c:4}]
table = Terminal::Table.from_hashes(array_of_hashes)

# > puts table
#
# +---+---+---+
# | a | b | c |
# +---+---+---+
# | 1 | 2 |   |
# |   | 3 | 4 |
# +---+---+---+