https://github.com/tj/terminal-table is great for handling ASCII in the console.
You can try the following:
require 'terminal-table/import' puts table(['route_id', 'route_color'], ["01-1079", "FFFF7C"], ["04-1079" , "FFFF7C"])
And the result should be:
+----------+-------------+ | route_id | route_color | +----------+-------------+ | 01-1079 | FFFF7C | | 04-1079 | FFFF7C | +----------+-------------+
Zainal
source share