benSlaughter/utilise — pull request #1 by jonathanchrisp (2013-11-30 17:36:57+00:00)
Title: Hash and Array support

Hey Ben,

I've added support for Hash and Array, please see the summary below:

* Refactored to_bool method to now check type
* Added methods bool_hash, bool_array and bool_it
* Updated README.md documentation

In short, object type is verified and then recursive action is done until object is a String, Fixnum or Symbol class, at which point bool_it is run to see if value matches rules, if so appropriate boolean value is returned. Please note that if nil is returned for a hash or array the original value will remain unchanged.

I've added new tests so the coverage should still be 100%.

I was think at a later point in time we could pass custom rules to convert values in hashes and arrays. I haven't updated the version number or date env variables as your the gem author! :)

Let me know what you think.

Cheers,
Jon