2011/5/24 Iaki Baz Castillo <ibc / aliax.net>:
> I've got the following output by using sprintf("%20s %20s",
> "#{key.to_s}:", value.to_s):
>
> ------------------------------------
>    listen_ip:    1.2.3.4
>   listen_port:       90
>     use_tls:      true
> compression:      false
> ------------------------------------
>
> but it's not exactly what I need.

Got it!:

sprintf("  %-20s %20s", "#{key.to_s}:", value.to_s)

------------------------------------
  listen_ip:           1.2.3.4
  listen_port:              90
  use_tls:                true
  compression:       false
------------------------------------

:)



-- 
Iaki Baz Castillo
<ibc / aliax.net>