class Hamster::Hash
def find
- Yieldreturn: - Truthy to halt iteration and return the yielded key/value pair.
Other tags:
- Yield: - At most once for each key/value pair, until the block returns `true`.
Returns:
-
(Array)
-
def find return enum_for(:find) unless block_given? each { |entry| return entry if yield entry } nil end