The `or` here is a bad idea. It doesn't do what you think it does; see http://devblog.avdi.org/2010/08/02/using-and-and-or-in-ruby/. Github actually ban them in their style guide: https://github.com/styleguide/ruby

This might be neater done with a case statement, maybe. If not, then definitely an `||`.