Can ruby's puts or print draw horizontal line kind of like bash does with printf+tr does ?
printf '%20s\n' | tr ' ' -
this will draw:
--------------------
You can use the following snippet
puts "-"*20
Check this for more help.
You might be interested in formatting using ljust, rjust and center as well.
I use a quick puts "*"*80 for debug purposes. I'm sure there are better ways.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With