On Sat, Nov 24, 2012 at 11:02 AM, Steve Tucknott <lists / ruby-forum.com> wrote:
> Is there a way of 'finding' (and getting the index value of the array
> line) a value in a specific column in a  multi-column array that you
> know of?

Yes, and it's a doozy :)

if you know the action number, say "20121123110100" in your example:

list.index { |l| l.action == "20121123110100" } # => array index

yields the index in the array list that matches the first item.

The "{..}" is a block, which is a group of code. This group is only
one statement, the test for equality. the "|l|" defines a paramter to
use in the block of code. The method "index" operates on the block of
code like the "each" method seen earlier, but in this case, instead of
just iterating, it returns the array index where the block returns a
true value.

Now, if instead of the array index, you wanted the actual object, you
would use the "select" method:

list.select { |l| l.action == "20121123110100" } # => {TodoItem object}