YAML

What is YAML? To know what YAML is, you have to see it for yourself. Or you could see a movie about it. Or I could just tell you.

YAML is a format for representing objects as strings. You can use other formats, but YAML is nice because it’s human-readable (and human-editable) as well as computer-readable. My wife actually writes YAML all the time, right there in her text editor. Then another program reads it in later. Pretty cool.

YAML is not actually part of the Ruby core (it is its own thing, and many other languages can use YAML), but it is part of the standard distribution. What does that mean? Well, when you install Ruby, you install YAML, too. But if you want to actually use YAML, you’ll need to import it into your program. This ...

Get Learn to Program, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.