← Reference

hash-methods

Ruby hash-methods reference.

Hash#any?

Check if any key-value pair in a Ruby Hash satisfies a condition. Hash#any? supports a block, pattern, or no-argument form.

hash.any? { |key, value| block } → true or false