Hello!
Long story short - let’s say i have an array of various dry types, one of them being enum type types_array = [Types::Params::String.default('red').enum('red', 'green', 'blue')].
- How can i check if given type has an enum defined for it? I’m talking about something like
types_array[0].enum?. I’m currently usingtypes_array[0].respond_to?(:values)but it feels a bit hacky How can i list possible values for given enum type? Something likethis one is solved - i just have to dotypes_array[0].enum_valuestypes_arra[0].values
If that’s something easy and documented - please forgive me. I spent a decent amount of time googling and going through your docs but without any luck sadly.
Thanks!