rmehner/badgeville — pull request #5 by mrnugget (2012-06-23 12:09:29+00:00)
Title: Helpers for level rewards

Currently you can't easily access the position of an level reward if it's a reward definition. If you have a reward which is not a definition, you can access the position via the `definition` attribute, since that gives access to `data['position']` of the JSON Badgeville returns.

This commit implements two accessors that make dealing with levels a tad easier: `start_points` and `position`. So whenever a rewards `type` is `'level'`, then those two accessors let you access `position` and `start_points` of the data hash.

What do you think? :)