table_print
table_print copied to clipboard
specify multiple columns in a single hash
For example when I do tp systems, :system => {:display_method => :name}, :epic => {:display_method => :xyz}
The second column will never be displayed. It is also not called it seems. I can specifiy any symbol, existing method or not. Only system column is displayed.
-@ostraaten
Make it possible to specify two columns within a single hash, instead of forcing you to add curly braces to turn each column into its own hash
lol, should have looked at issues sooner, I just found this issue 😜
require 'table_print'
tp [{first: "Josh", last: "Cheek"}],
:first,
:last,
# full: -> u { "#{u[:first]} #{u[:last]}"}, # <-- uncommenting this causes username to be omitted
username: -> u { "#{u[:first][0]}#{u[:last]}"[0, 8].downcase }
# >> FIRST | LAST | USERNAME
# >> ------|-------|---------
# >> Josh | Cheek | jcheek