Pass an array to when.

The when parameter in a case statement expects a boolean condition or a
matching expression. I found this helpful;

http://ilikestuffblog.com/2008/04/15/how-to-write-case-switch-statements-in-ruby/

Based on that, I suspect I could also ditch the .to_s and just compare
class types.