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
618 stars 19 forks source link

Mixin over inheritance #16

Closed mgomes closed 1 year ago

mgomes commented 1 year ago

Cool gem! Have you considered switching shale to be included within a class rather than inheriting from Shale::Mapper? I think shale would have better interoperability with ActiveRecord models, for example, if that were the case.

kgiszczak commented 1 year ago

You can achieve the same results using custom models https://github.com/kgiszczak/shale#using-custom-models