joeldrapper / literal

A literal Ruby gem. 💎
MIT License
163 stars 7 forks source link

AttributesProxy #21

Open joeldrapper opened 1 year ago

joeldrapper commented 1 year ago

A module that behaves like Literal::Attributes, but proxies all the setting and getting to super. This could be used on ActiveRecord models, for example.

joelmoss commented 2 weeks ago

Would this also extend to ActiveModel models too? Coz I have a real need to use the ActiveModel attributes API with literal types...

attribute :therapist_id, _Union(String, Symbol)
joeldrapper commented 2 weeks ago

Yeah, that's what this is for.