Validate Ruby hashes against an expected structure