I know the (de)serialization story is a constant work in progress, and I really like the move to
include YAML::Serializable over
YAML.mapping but I’m not sure if I can currently do the following…
I want to be able to deserialize into a class based on a YAML field value.
... name: "Some name" type: foo value: "Some value"
I would like to be able to provide logic - probably a switch statement - to serialize into a specific type (all likely a child of a shared parent class) based upon this value.
Is this something that’s currently possible? I tried very briefly looking at other
#from_yaml implementations but while trying to get my head around how it works (and the not-so-great compiler messages that get thrown in these scenarios), I wanted to make sure I was barking up the right tree to begin with.
Thanks a lot!