Is there a way to define an attribute having a name that ends in a question mark?
Dry-struct seems to respect :'my_attribute??'
and create an optional attribute named, my_attribute?
. However, I haven’t found a way to create a required attribute that ends in a question mark. Using :'my_attribute?'
seems to create an optional attribute named, my_attribute
.
This is correct, it’s a limitation coming from dry-types. I’m not sure if there’s a good-looking workaround for this, it’s a rare use case after all. As far as I can remember, this surfaced only two times (this is the second).