Skip to content

Commit

Permalink
Revised doc to show that rows can be splatted now
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Mar 15, 2009
1 parent 2026fc3 commit c4cac02
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.rdoc
Expand Up @@ -7,16 +7,16 @@ Simple, feature rich ASCII table generator.

* Fast
* Simple
* With or without headings
* Alignment of headings, cells, or columns
* Easy modification of table chars (+, -, |)
* Optional headings
* Alignment of columns, headings, or cells
* Easy modification of table strings (+, -, |)

== Examples:

require 'rubygems'
require 'terminal-table/import'

puts table(['a', 'b'], [[1, 2], [3, 4]])
puts table(['a', 'b'], [1, 2], [3, 4])

t = table ['a', 'b']
t << [1, 2]
Expand Down Expand Up @@ -45,14 +45,14 @@ Simple, feature rich ASCII table generator.
rows << ['Comments', 20]
rows << ['Ruby', 70]
rows << ['JavaScript', 30]
puts table([nil, 'Lines'], rows)
puts table([nil, 'Lines'], *rows)

rows = []
rows << ['Lines', 100]
rows << ['Comments', 20]
rows << ['Ruby', 70]
rows << ['JavaScript', 30]
puts table(nil, rows)
puts table(nil, *rows)

== Results:

Expand Down

0 comments on commit c4cac02

Please sign in to comment.