module Gemmy::Patches::HashPatch::ClassMethods::Zip

facets Hash.zip(, [1,2,3])

> { “a”=>1, “b”=>2, “c”=>3 }

Public Instance Methods

zip(keys,values) click to toggle source
# File lib/gemmy/patches/hash_patch.rb, line 10
def zip(keys,values) # or some better name
  h = {}
  keys.size.times{ |i| h[ keys[i] ] = values[i] }
  h
end