class Hash
the following extension for class Hash
is needed (from Facets of Ruby library):
Public Class Methods
zip(keys,values)
click to toggle source
# File lib/extensions/hash.rb, line 4 def self.zip(keys,values) # from Facets of Ruby library h = {} keys.size.times{ |i| h[ keys[i] ] = values[i] } h end