kgiszczak / shale

Shale is a Ruby object mapper and serializer for JSON, YAML, TOML, CSV and XML. It allows you to parse JSON, YAML, TOML, CSV and XML data and convert it into Ruby data structures, as well as serialize data structures into JSON, YAML, TOML, CSV or XML.
https://shalerb.org/
MIT License
626 stars 19 forks source link

Ability to pass options to YAML options #32

Closed jwhitcraft closed 7 months ago

jwhitcraft commented 7 months ago

Saying i have a YAML file that uses aliases, it would be nice to be able pass in the options to the yaml adapter.

Eg:

Person.from_yaml(yaml, aliases: true)

I see this is done for CSV it would be nice to extend it to the default yaml adapter.

kgiszczak commented 7 months ago

Thank you for this suggestion. You should be able to do this on master now.