|
If a class has many parameters and you want to make all hash parameters have hash or deep merge and all array parameters to have unique merge while all non collection values have firt found strategy then it is not possible to define all of that with one pattern for the class itself. Instead you would need to individually list all keys, or be very clever with the use of suffixes on the parameter names (for example plural 's', or 'list' for arrays, and 'map' or 'hash' on hashes) and the pattern match on those.
It would be great to be able to specify some kind of combined pattern 'first+unique+hash/deep'. and that they apply to the respective data type being found.
This only applies for a pattern based lookup_options since everywhere else the lookup is for a single key - although there is no harm in having this as a "i don't know what the type is" but please merge/unique hashes and arrays...
|