1.0.0 2019-04-23
Changed
valid?
and===
behave differently,===
works the same wayClass#===
does andvalid?
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