B
bwv549
How to emit yaml without the leading hyphens?
[1,2,3].to_yaml
# ==>"--- \n- 1\n- 2\n- 3\n"
I realize that I can do the following to get the result I'm after, but
it seems sort of "after the fact"
[1,2,3].to_yaml[5..-1]
# ==>"- 1\n- 2\n- 3\n"
I know 'to_yaml' takes options, but I can't find acceptable options
anywhere.
[1,2,3].to_yaml({:??? => true})
Thanks!
[1,2,3].to_yaml
# ==>"--- \n- 1\n- 2\n- 3\n"
I realize that I can do the following to get the result I'm after, but
it seems sort of "after the fact"
[1,2,3].to_yaml[5..-1]
# ==>"- 1\n- 2\n- 3\n"
I know 'to_yaml' takes options, but I can't find acceptable options
anywhere.
[1,2,3].to_yaml({:??? => true})
Thanks!