Dry Struct
Create structured Ruby values with named, typed fields.
dry-rb · Code and testing
GitHub projectOpen source Open on GitHubHow to try it
With Ruby 3.2 available, install dry-struct at version 1.8.1. Build a fruit object from a string and a numeric parameter.
What we tested
1.8.1. Build a fruit object from a string and a numeric parameter. The struct returned pear and converted the count from a string to an integer.