Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Ruby Gem to print a list of objects to a console as a table
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
README.md
Rakefile
tablecon-0.0.1.gem
tablecon.gemspec

README.md

Tablecon

A simple library that is able to print an object as a table.

Example:

class Person
  def initialize name, age
    @name = name
    @age = age
  end
end

people = [
 Person.new("Kurt", 30),
 Person.new("Eddie", 45),
 Person.new("Scott", 40)
]

puts Tablecon::Table.new people

The result will be:

+-------+-----+
| Name  | Age |
+-------+-----+
| Kurt  | 30  |
+-------+-----+
| Eddie | 45  |
+-------+-----+
| Scott | 40  |
+-------+-----+
Something went wrong with that request. Please try again.