Skip to content

Instantly share code, notes, and snippets.

@baisa
Forked from slawosz/pretty_array.rb
Created August 3, 2013 14:39
Show Gist options
  • Save baisa/6146687 to your computer and use it in GitHub Desktop.
Save baisa/6146687 to your computer and use it in GitHub Desktop.
array = [['Number', 'Name'], [1, 'Foo'], [2, 'Bar'], [3, 'Baz']]
pretty_table(array)
# printed result:
+--------+--------+
| Number | Name |
+--------+--------+
| 1 | Foo |
+--------+--------+
| 2 | Bar |
+--------+--------+
| 3 | Baz |
+--------+--------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment