Properties utilities for Crystal lang.
Mixin module that should be included in a class or a struct.
This module improves the std's accessor macros (
It provide a kind of IoC (Inversion Of Control).
- Add the dependency to your
dependencies: prop: github: nicolab/crystal-prop
📘 API doc.
If you are looking for a validator to validate data before instantiating a class or a struct, you may be interested by validator. This validator shard uses
Propinternally to define and handle validation rules on each instance variable.
Install dev dependencies:
Clean before commit:
crystal tool format ./bin/ameba
- Fork it (https://github.com/Nicolab/crystal-prop/fork)
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request
MIT (c) 2021, Nicolas Talle.
| | |---| | Nicolas Talle | | |