Creating Output Tables

A

Ari Brown

HAI,
Is there a suggested library for creating nice tabley outputs? I was
looking for output much in the way that benchmark has its output.

asdf 12321 asdf
asdf 12312 qemp[g
qlfckjsd 987234 asdf

etcetera.


KTHXBAI,
Ari
-------------------------------------------|
Nietzsche is my copilot
 
H

hemant

HAI,
Is there a suggested library for creating nice tabley outputs? I was
looking for output much in the way that benchmark has its output.

asdf 12321 asdf
asdf 12312 qemp[g
qlfckjsd 987234 asdf

etcetera.

May be ruport, but i think you already know about it.
 
M

Michael Fellinger

HAI,
Is there a suggested library for creating nice tabley outputs? I was
looking for output much in the way that benchmark has its output.

asdf 12321 asdf
asdf 12312 qemp[g
qlfckjsd 987234 asdf

etcetera.

require 'ruport'

table = [
%w[asdf 12344 asdf],
%w[asdf 12342 qwer(d],
%w[zxcvdfg 23521 vbcbd]
].to_table

puts table.to_text # =>

+--------------------------+
| asdf | 12344 | asdf |
| asdf | 12342 | qwer(d |
| zxcvdfg | 23521 | vbcbd |
+--------------------------+
 
A

Ari Brown

Thanks!


HAI,
Is there a suggested library for creating nice tabley
outputs? I was
looking for output much in the way that benchmark has its output.

asdf 12321 asdf
asdf 12312 qemp[g
qlfckjsd 987234 asdf

etcetera.

require 'ruport'

table = [
%w[asdf 12344 asdf],
%w[asdf 12342 qwer(d],
%w[zxcvdfg 23521 vbcbd]
].to_table

puts table.to_text # =>

+--------------------------+
| asdf | 12344 | asdf |
| asdf | 12342 | qwer(d |
| zxcvdfg | 23521 | vbcbd |
+--------------------------+

--------------------------------------------|
If you're not living on the edge,
then you're just wasting space.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,191
Latest member
BuyKetoBeez

Latest Threads

Top