Class Hash
In: util/aryzip.rb
Parent: Object

Hash.zip(array)

Methods
zip   
Public Class methods
zip(a)

Given an array of pairs (e.g., [ [a,b], [c,d,e] ]), returns a a hash s.t. the keys are the first elements of the arrays, and the values are the last elements of the array. Given the example above, the resulting hash would be { a=>b, c=>[d,e] }.

a
Array to transform into hash.
# File util/aryzip.rb, line 82
    def zip(a)
      h = {}
      a.each { |aa| h[aa.car] = aa.cdr }
      return h
    end