Skip to content

v0.6.0

Compare
Choose a tag to compare
@flash-gordon flash-gordon released this 22 Mar 13:54
v0.6.0
5069d4b

v0.6.0 2018-10-24

Changed

  • [BREAKING] Struct.attribute? in the old sense is deprecated, use has_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)

Compare v0.5.1...v0.6.0