Closed solnic closed 10 years ago
I'm gonna merge it in now because it's gotten huge and the main goal has been achieved which was to make it work with axiom-types instead of virtus' own types hierarchy.
Not all tasks are completed though. I'm gonna create a new branch and start fresh there with a new PR which will clean up and improve the messy parts of this PR (mostly related to huge Builder class and the way axiom types are determined + I want to nuke remaining attribute subclasses as it should be possible to replace them with modules just like coercible/named/lazy are done now).
This is a WIP
Summary
Attribute::Named
- adds behaviour for attributes that have a name, such attributes can be used to write/read ivars in modelsAttribute::Coercible
- coerces input before settingAttribute::LazyDefault
- loads default value when reading an attribute for the first time (original default virtus behaviour in 0.5.x)Higher-level benefits coming from this integration/refactor:
Things we need to change/improve in axiom-types:
TODO
TypeLookup
Attribute.primitive