# File lib/arrayfields.rb, line 429 def [](*pairs) pairs.flatten! raise ArgumentError, "argument must be key/val pairs" unless (pairs.size % 2 == 0 and pairs.size >= 2) keys, values = [], [] while((k = pairs.shift) and (v = pairs.shift)) keys << k and values << v end new keys, values end
Generated with the Darkfish Rdoc Generator 2.