Style nitpick: in case statements, `when` should be indented at the same level as `case`: https://github.com/styleguide/ruby