← Reference

hash-methods

Ruby hash-methods reference.

Hash#fetch

Retrieve a value by key, with explicit error handling when the key is absent. Use fetch to avoid silent nil returns from missing keys.