Ruby yaml: Difference between revisions
From wikinotes
(Created page with "<source lang="ruby"> require 'yaml' YAML.load("a: 1") #> {"a"=>1} </source>") |
No edit summary |
||
Line 4: | Line 4: | ||
YAML.load("a: 1") | YAML.load("a: 1") | ||
#> {"a"=>1} | #> {"a"=>1} | ||
YAML.dump(['a', ['b']], indentation: 2) | |||
</source> | </source> |
Revision as of 20:45, 19 September 2022
require 'yaml'
YAML.load("a: 1")
#> {"a"=>1}
YAML.dump(['a', ['b']], indentation: 2)