Since I notice _why is around, I’ll ask a couple of things
that have been on my mind.
First of all, are there guidelines somewhere for writing YAML
manually? I can’t figure out how to put hashes/arrays in a
single line instead of multiple lines. (I got the idea this was
possible somehow.)
Also, why don’t we have #load_file and #dump_file or something
of that nature? I frequently find myself doing:
First of all, are there guidelines somewhere for writing YAML
manually? I can’t figure out how to put hashes/arrays in a
single line instead of multiple lines. (I got the idea this was
possible somehow.)
First of all, are there guidelines somewhere for writing YAML
manually? I can’t figure out how to put hashes/arrays in a
single line instead of multiple lines. (I got the idea this was
possible somehow.)
you’ve seen the Cookbook? [1] see the section on inline collections [2]
for examples. yikes, i just noticed this is missing from the docs. [3]
i will fix.
Also, why don’t we have #load_file and #dump_file or something
of that nature? I frequently find myself doing:
YAML::load and YAML::dump both accept IO objects of any kind:
obj = YAML::load( File.open( “filename” ) )
to dump:
YAML::dump( obj, File.open( “filename2” ) )
follows Marshal’s API.
please ask all you like, i’m interested to know where documentation is
lacking (working on ri docs today) and what is tripping up any of you
from slathering your scripts in YAML.