--QKpLca3blcvhMJ0W
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2006.10.03 01:45, Wes Gamble wrote:
> I have this:
> 
> FILTER_COLUMNS = Array.new
> DISPLAYABLE_COLUMNS.each do |field_array|
>   FILTER_COLUMNS << [ field_array[1], field_array[0] ]
> end
> 
> Is there any way to write this so that it could look something like:
> 
> FILTER_COLUMNS = DISPLAYABLE_COLUMNS.each do |field_array|
>   ??? << [ field_array[1], field_array[0] ]
> end

Take a look at Enumerable, specifically #inject.


--QKpLca3blcvhMJ0W
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFFIUOI7Nh7RM4TrhIRAmHeAKDxbGP9ataNwmYlVnZO7NHMvuNvLACfTK63
iP6+bmciThSyRV4yc7gkRpoqC
-----END PGP SIGNATURE-----

--QKpLca3blcvhMJ0W--