Releases: stitchfix/immutable-struct
Releases · stitchfix/immutable-struct
v2.5.0 Support Pattern Matching
Notable Changes
- Support pattern matching on instances by @RobinDaugherty in #70
New Contributors
- @alimac made their first contribution in #46
- @samsm made their first contribution in #53
- @stitchfixsam made their first contribution in #55
- @zackse made their first contribution in #58
- @nshemonsky made their first contribution in #61
- @RobinDaugherty made their first contribution in #70
Full Changelog: v2.4.1...v2.5.0
Reduce metaprogramming
Just a small refactor to remove unneeded metaprogramming. See #44
Value Coercion
This release includes a new feature that supports the coercion of some value into a specific mutable struct type. Currently it supports Hashes compatible with the struct's initializer. See #42 for more details.
v2.3.0.rc1
RC release to incorporate #33, which allows .to_json
calls on ImmutableStruct
objects to be made recursively and include all Zero-argument methods as well.
v2.2.3
v2.2.2
- Added
hash
method to enable immutable-struct instances to be Set-friendly. Hash code values are constructed from the state (all attribute values) and the class - Modified to_h method to only call methods with zero args. Addresses issue logged as "#to_h serializes all instance methods" from @nandosola's PR. Thank you, @nandosola!
v2.2.0
- Adds
merge
which creates a new object based on the current one with the given properties overridden. Thanks @toddmohney (see #15)
v2.1.2
v2.1.1
- Update email contact and homepage
- gemspec updates