text-table icon indicating copy to clipboard operation
text-table copied to clipboard

Align to :right by default?

Open klepsydra opened this issue 13 years ago • 0 comments

Great gem! Thank you! Question, since my tables are mainly numeric, visually it is much better to have them aligned :right not :left by default.

I looked at the code, but am unsure how to add support for the Text::Table style to have newly created tables have :alignment => :right by default before they get initialized.

No quick global switch like datalist.to_table.alignment=:right seems to work either.

As it is now, I have to first create a table, keep it into a variable (not just puts someCSVdata.to_table), iterate through each column or cell to align right, then print the text table.

klepsydra avatar Apr 12 '12 09:04 klepsydra