v0.6.0
v0.6.0 2018-10-24
Changed
- [BREAKING]
Struct.attribute?
in the old sense is deprecated, usehas_attribute?
as a replacement
Added
-
Struct.attribute?
is an easy way to define omittable attributes (flash-gordon):class User < Dry::Struct attribute :name, Types::Strict::String attribute? :email, Types::Strict::String end # User.new(name: 'John') # => #<User name="John">
Fixed
Struct#to_h
recursively converts hash values to hashes, this was done to be consistent with current behavior for arrays (oeoeaio + ZimbiX)