dry-struct v1.1.1 Release Notes

Release Date: 2019-10-13 // about 2 years ago
  • 🔄 Changed

    • Pattern matching syntax is simplified with deconstruct_keys (k-tsj)
      User = Dry.Struct(name: 'string', email: 'string')
    
      user = User.new(name: 'John Doe', email: '[email protected]')
    
      case user
      in User(name: 'John Doe', email:)
        puts email
      else
        puts 'Not John'
      end
    

    See more examples in the specs.

    Compare v1.1.0...v1.1.1