Skip to content

Releases: stitchfix/immutable-struct

Reduce metaprogramming

18 Apr 19:47
Compare
Choose a tag to compare

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

Value Coercion

20 Mar 14:03
Compare
Choose a tag to compare

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

08 Aug 13:51
Compare
Choose a tag to compare
v2.3.0.rc1 Pre-release
Pre-release

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

01 May 20:12
Compare
Choose a tag to compare
  • [FIX] Handle array attributes in hash/equality methods. Fixed with PR #28

v2.2.2

22 Feb 16:44
Compare
Choose a tag to compare
  • 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

07 Jan 20:34
Compare
Choose a tag to compare
  • Adds merge which creates a new object based on the current one with the given properties overridden. Thanks @toddmohney (see #15)

v2.1.2

21 Oct 20:41
Compare
Choose a tag to compare
  • Added == and eql? support; closes #11. Thanks, @swanandp!
  • Minor modification to method implementation in test struct in spec.

v2.1.1

14 Aug 21:37
Compare
Choose a tag to compare
  • Update email contact and homepage
  • gemspec updates

v2.1.0

25 Feb 14:23
Compare
Choose a tag to compare
  • Array coercion as an option via ImmutableStruct.new(:name,[:addresses]). See #2