Made api more Ruby-like and fixed some bugs.

These are some changes that I made a while back. I thought the api was maintained by shopstyle, so I submitted the PR to the wrong fork. Here it is again.
I think you would want an error raised here, if you pass invalid input. Otherwise it would just fail silently and you would have no idea what's wrong.