Improvement
sandymcp opened this issue · 2 comments
sandymcp commented
Rather than checking for specific container classes, you could use
thing.respond_to?(:empty?)
To check if you can call empty
kwilczynski commented
Hi @sandymcp, thank you for reaching out.
I am sure it can be an improvement, but what I am not sure is what to? Do you have an example?
Thank you in advance!
kwilczynski commented
Closing.