Hash Flashcards
1
Q
key
A
.key(value) returns the first occurrence of that value in the hash:
{foo: 17, bar: 17, ninja: 18}.key(0)
=> :foo
2
Q
each_value { |value| block }
A
.each_value is like .each but it only iterates over the values.