each()
public
Iterate through the tuple, yielding the index or key, and the value, thus
ensuring arrays are iterated similarly to hashes.
Show source
def each
if Hash === @tuple
@tuple.each { |k, v| yield(k, v) }
else
@tuple.each_with_index { |v, k| yield(k, v) }
end
end