# Changelog All notable changes to this project will be documented in this file. ## [0.9.1] - 2022-03-06 ### Fixed - `finalize` now accepts lambdas with arity `-2`. For example `->(a, *b) {}` or `:freeze.to_proc` which in `Ruby >= 3` returns lambda with arity equal to `-2`. ## [0.9.0] - 2021-12-19 ### Changed - `:finalize` block is not invoked on the `option` with `optional: true` flag; ## [0.8.0] - 2021-12-04 ### Added - New options for option and param attributes: - Support for attribute **aliasing** (`:as` parameter); - supports: `option`, `param`; - Support for attribute **auto-casting** (`:auto_cast` parameter); - supports: `option`, `param`; - Support for **mutable** attributes (`:mutable` parameter) with type-validation inside; - supports: `option`, `options`, `param`, `params`; - Support for **optional** attributes (`:optional` parameter); - supports: `option`; - **SmartCore::Initializer::Configuration**: - Configuration setting `strict_options` now works separately "per-class" in all configs manner (each class shares the global state but has own state too) - Support for per-class/global `:auto_cast` configuration; - provides a global/per-class behavior for `:cast` option (`false` by default); - `options` declaration now supports `privacy` option; - `params` declaration now supports `privacy` option; ### Changed - Drop support of **Ruby@2.4**; - `:default` attribute parameter now duplicates the passed value during object instantiation; - `:default` attribute parameter only works with `option` attribute (`param` can't have `default` parameter now); - Attribute values generated by `:finalize` are type-validated now too; - Now lambda-based `:finalize` attributes are being checked for the signature during attribute declaration; - Some error messages have become more readable; ## Fixed - `send` method overlaping/rewriting: otions and params named as `send` breaks the internal framework-related invocations of the attribute definitioning inside the custom object constructor (this name rewrites internal Ruby's `send` method and brokes some things); ## [0.7.0] - 2021-06-23 ### Added - `strict_options` config option for non-strict checking of passed options; ## [0.6.0] - 2021-06-23 ### Added - Validation messages for incorrect attribute types; ## [0.5.0] - 2021-01-18 ### Changed - Updated `smart_types` dependency (`~> 0.4.0`) to guarantee **Ruby@3** compatibility; - Updated development dependencies; ## [0.4.0] - 2021-01-18 ### Added - Support for **Ruby 3**; ### Changed - Moved from `TravisCI` to nothing (todo: migrate to `GitHub Actions`). Temporary: we must run test cases locally. - Updated development dependencies; ## [0.3.2] - 2020-07-12 ### Fixed - Deeply inherited entities lose their `__initializer_settings__` entitiy; ## [0.3.1] - 2020-07-12 ### Fixed - Deeply inherited entities lose their class attribute definers; ## [0.3.0] - 2020-07-11 ### Added - `extend_initialization_flow` alias method for `SmartCore::Initializer.ext_init`; - Access methods to the instance attribute lists (`#__params`, `#__options__`, `#__attributes__`); ### Changed - Updated development dependencies; ## [0.2.0] - 2020-05-16 ### Changed - **Constructor**: disallow unknown option attributes; ## [0.1.0] - 2020-05-10 - Release :)