Skip to content

MrBocch/cli-table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cli-table

Present 2 dimensional arrays into a table

How to install

gem install cli-table

How to use

require 'cli-table'

t = Table.new ["Student", "Math", "Science", "English"]

t.rows = [
    ["John", 85, 90, 88],
    ["Sarah", 78, 85, 92],
    ["David", 91, 88, 85],
    ["George", 99, 99, 99]
]

t.show

screenshot

All rows must be of the same size.

TODO

  • maybe #show() should print it out but .to_s() returns a string,
  • add configuribility

Inspiration

This all came about when I wanted to print something similar to sqlite .mode box in this project

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages