meruby
5/14/2005 10:40:00 PM
Thanks, I was trying this with latest version of syck instead of CVS. I
have another question:
How can you do this for each items in Hash? for example
=>d = {'first', [1,2,3], 'second', [11,12,13]}
=>d.to_yaml
=> "--- \nsecond: \n- 11\n- 12\n- 13\nfirst: \n- 1\n- 2\n- 3\n"
irb(main):011:0> def d.to_yaml_style; :inline; end
=> nil
irb(main):013:0> d.to_yaml
=> "--- {second: [11, 12, 13], first: [1, 2, 3]}\n"
Instead I want
"--- {second: [11, 12, 13], \n first: [1, 2, 3]}\n"
so that each key/value are inline but each of them are on seperate
line? In short I am trying to reduce # of lines in yaml but keep it
human readable.