Skip to content

tiimgreen/tabbit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Write tables in the command line.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published