Hoodoo includes a grab-bag of utility methods used internally to keep its footprint, including external dependencies, to a minimum. These methods are part of the public API and covered by RDoc. This Guide lists the facilities available in groups, making them easier to discover.
It is generally recommended that service authors use Hoodoo utility methods where possible to help ensure consistent behaviour across the system.
collated_hash_from– build a Hash from an Array, allowing duplicate entries
deep_dup– duplicate a Hash and any nested Hashes
stringify– convert keys to Strings
symbolize– convert keys to Symbols
deep_merge_into– merge one Hash into another, including any nested Hashes
Comparison and access
hash_diff– compare two Hashes
hash_key_paths– extract the key paths for a Hash and any nested Hashes into a flat Array
Date and time
nanosecond_iso8601– consistent rendering of a Time or DateTime with nanosecond precision
rationalise_datetime– convert various forms of input representation into a DateTime instance
valid_iso8601_subset_date?– see if a String describing a date conforms to the Hoodoo ISO 8601 subset
valid_iso8601_subset_datetime?– see if a String describing a date and time conforms to the Hoodoo ISO 8601 subset