Updates the enum to accept -ve values

When using enum values, a value of a -ve number is not allowed because
it is implemented as an array. Changes the implementation to a hash to
accept -ve numbers
Merge pull request #55 from hassox/master

Update enum to accept negative values