Skip to content

Latest commit

 

History

History
62 lines (43 loc) · 1.24 KB

README.md

File metadata and controls

62 lines (43 loc) · 1.24 KB

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', '[email protected]', '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