Skip to content

Releases: stitchfix/immutable-struct

v2.5.0 Support Pattern Matching

Choose a tag to compare

@soulcutter soulcutter released this 25 Feb 13:51

Notable Changes

New Contributors

Full Changelog: v2.4.1...v2.5.0

Reduce metaprogramming

Choose a tag to compare

@iamvery iamvery released this 18 Apr 19:47

Just a small refactor to remove unneeded metaprogramming. See #44

Value Coercion

Choose a tag to compare

@iamvery iamvery released this 20 Mar 14:03

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

v2.3.0.rc1 Pre-release
Pre-release

Choose a tag to compare

@marksim marksim released this 08 Aug 13:51

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

Choose a tag to compare

@sipple sipple released this 01 May 20:12
  • [FIX] Handle array attributes in hash/equality methods. Fixed with PR #28

v2.2.2

Choose a tag to compare

@billeisenhauer billeisenhauer released this 22 Feb 16:44
  • 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

Choose a tag to compare

@davetron5000 davetron5000 released this 07 Jan 20:34
  • Adds merge which creates a new object based on the current one with the given properties overridden. Thanks @toddmohney (see #15)

v2.1.2

Choose a tag to compare

@billeisenhauer billeisenhauer released this 21 Oct 20:41
  • Added == and eql? support; closes #11. Thanks, @swanandp!
  • Minor modification to method implementation in test struct in spec.

v2.1.1

Choose a tag to compare

@simeonwillbanks simeonwillbanks released this 14 Aug 21:37
  • Update email contact and homepage
  • gemspec updates

v2.1.0

Choose a tag to compare

@davetron5000 davetron5000 released this 25 Feb 14:23
  • Array coercion as an option via ImmutableStruct.new(:name,[:addresses]). See #2