Project

tabbit

0.01
No commit activity in last 3 years
No release in over 3 years
Tabbit is a simple tool for making tables in the command line.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

>= 0
 Project Readme

Tabbit Build Status Gem Version

Write flexible, customisable tables in the console.

Installation

To install Tabbit via RubyGems:

$ gem install tabbit

Or add this line to your application's Gemfile:

gem 'tabbit'

And then execute:

$ bundle

Usage

To make a new Table initialise Tabbit, passing in the Headers as the params:

table = Tabbit.new('Name', 'Email', 'Phone No.')

To add an entry:

table.add_row('Tim Green', 'tiimgreen@gmail.com', '123-456-789')

To print the table:

puts table.to_s
require 'tabbit'

table = Tabbit.new('Name', 'Email', 'Phone No.')

10.times do |n|
  table.add_row("Tim Green #{n}", "tiimgreen#{n}@gmail.com", "123-456-789")
end

puts table.to_s

Result

Contributing

  1. Fork it (http://github.com/tiimgreen/tabbit/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request