Try using a [switch](http://coffeescript.org/#switch)