dry-types is a simple and extendable type system for Ruby with support for coercions and constraints.


Use cases

dry-types is suitable for many use-cases, for example:

  • Value coercions
  • Processing arrays
  • Processing hashes with explicit schemas
  • Defining various domain-specific information shared between multiple parts of your applications
  • Annotating objects

Other gems using dry-types

dry-types is often used as a low-level abstraction. The following gems use it already: