This is good. You could also use a [case statement](http://ruby.about.com/od/control/a/The-Case-Statement.htm) here, it's a really common pattern for this type of thing