Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align to :right by default? #2

Open
klepsydra opened this issue Apr 12, 2012 · 0 comments
Open

Align to :right by default? #2

klepsydra opened this issue Apr 12, 2012 · 0 comments

Comments

@klepsydra
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant