2009-04-01 8 views

Respuesta

19

Ah, lo tengo.

each_with_index 

woo!

editar: ¡Ups!

1

Para mayor completitud.

Thing.each_with_index {|obj, index_num| puts [obj, index_num].join(" has an index of ")} 
Cuestiones relacionadas