Psych.dump(o) â string of yamlPsych.dump(o, options) â string of yamlPsych.dump(o, io) â io object passed inPsych.dump(o, io, options) â io object passed in
Class Public methods
Dump Ruby object o to a YAML string. Optional
options may be passed in to control the output format. If an
IO object is passed in, the YAML will be dumped to
that IO object.
Example:
# Dump an array, get back a YAML string
Psych.dump(['a', 'b']) # => "---\n- a\n- b\n"
#