Skip to content

v1.4.0

Compare
Choose a tag to compare
@dry-bot dry-bot released this 21 Jan 18:59
v1.4.0

Added

  • Support for wrapping constructors and fallbacks, see release notes for dry-types 1.5.0 (@flash-gordon)
  • Improvements of the attribute DSL, now it's possible to use optional structs as a base class (@flash-gordon)
    class User < Dry::Struct
      attribute :name, Types::String
      attribute :address, Dry::Struct.optional do
        attribute :city, Types::String
      end
    end
    
    User.new(name: "John", address: nil) # => #<User name="John" address=nil>

Compare v1.3.0...v1.4.0