gems dry-struct 1.0.0

latest releases: 1.7.1, 1.7.0, 1.6.0...
5 years ago

1.0.0 2019-04-23

Changed

  • valid? and === behave differently, === works the same way Class#=== does and valid? checks if the value can be coerced to the struct (flash-gordon)

Added

  • Struct.call now accepts an optional block that will be called on failed coercion. This behavior is consistent with dry-types 1.0. Note that .new doesn't take a block (flash-gordon)
    User = Dry::Struct(name: 'string')
    User.(1) { :oh_no }
    # => :oh_no

Compare v0.7.0...v1.0.0

Don't miss a new dry-struct release

NewReleases is sending notifications on new releases.