What makes you think that you cannot parse YAML? The error message says that Psych::Nodes::Document
does not have a []
method, and this is true, but the fact that you returned a Psych::Nodes::Document
object instead of an exception means that the parsing did work.
You can learn more about how Psych YAML AST is developed and how it works in the Psychological Documentation for Psych::Nodes
.
source share