The code
require \'yaml\' puts YAML.load(\" is_something: values: [\'yes\', \'no\'] \").to_yaml
produces
--- is_somethin
The latest versions of Ruby use the Psych module for YAML parsing. There aren't many options that you can pass but you can change indention and line width. Check the latest Psych documentation for more details.