This case/when syntax is no longer supported in Ruby 1.9.2. Changed it so it should work with any Ruby.
Merge pull request #2 from brenttheisen/master

Fix for Ruby 1.9.2 Syntax Change Problem