gems dry-types 1.1.0

latest releases: 1.8.3, 1.8.2, 1.8.1...
6 years ago

1.1.0 2019-07-02

Added

  • New builder method Interface constructs a type which accepts objects that respond to the given methods (waiting-for-dev)
    Types = Dry.Types()
    Types::Callable = Types.Interface(:call)
    Types::Callable.valid?(Object.new) # => false
    Types::Callable.valid?(proc {})    # => true
  • New types: coercible.symbol, params.symbol, and json.symbol, all use .to_sym for coercion (waiting-for-dev)

Fixed

  • Converting schema keys to maybe types (flash-gordon)
  • Using Schema#key and Array#member on constuctors (flash-gordon)
  • Using meta(omittable: true) within transform_types works again but produces a warning, please migrate to .omittable or .required(false) (flash-gordon)
  • Bug with a constructor defined on top of enum (flash-gordon)

Compare v1.0.1...v1.1.0

Don't miss a new dry-types release

NewReleases is sending notifications on new releases.