Method: Hash#each_with_key
- Defined in:
- lib/core/facets/hash/each_with_key.rb
#each_with_key(&yld) ⇒ Object
Each with key is like each_pair but reverses the order the parameters to [value,key] instead of [key,value].
CREDIT: Trans
8 9 10 |
# File 'lib/core/facets/hash/each_with_key.rb', line 8 def each_with_key( &yld ) each_pair{ |k,v| yld.call(v,k) } end |