Dry Types
Validate and coerce values with named Ruby types.
dry-rb · Code and testing
GitHub projectOpen source Open on GitHubHow to try it
With Ruby 3.2 available, install dry-types at version 1.9.1. Coerce a sample numeric string while preserving a regular string value.
What we tested
1.9.1. Coerce a sample numeric string while preserving a regular string value. The parameter type converted "5" to an integer and kept pear as text.