Documentation for Psych to_yaml options?

放肆的年华 提交于 2019-11-30 10:54:42

Deep in the guts of ruby-1.9.3-p125/ext/psych/emitter.c I found three options:

  • indentation - The level must be less than 10 and greater than 1.
  • line_width - Set the preferred line width.
  • canonical - Set the output style to canonical, or not (true/false).

And they work!

When you want to disable line wrap, use this option:

line_width: -1
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!