Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/extensions/hash.rb
Class Method Summary collapse
-
.zip(keys, values) ⇒ Object
from Facets of Ruby library, CREDIT: Trans, Ara T.
Class Method Details
.zip(keys, values) ⇒ Object
from Facets of Ruby library, CREDIT: Trans, Ara T. Howard
2 3 4 5 6 |
# File 'lib/extensions/hash.rb', line 2 def self.zip(keys,values) # from Facets of Ruby library, CREDIT: Trans, Ara T. Howard h = {} keys.size.times{ |i| h[ keys[i] ] = values[i] } h end |