From: Rob Redmon Date: 2009-04-30T04:03:04+09:00 Subject: Finding Matches in Array of Classes I have an ActiveRecord find result. An element's contents look like: irb(main):090:0> results[0] => # The class of "observation_time" is: results[0].observation_time.class => Time What I'd like to do is find those elements which match on a particular range of "observation_time". I'm used to Matlab and IDL programming where one just does something like this: indices = where( results.observation_time >= "2008-1-1" and results.observation_time < "2009-1-1" ) What's the ruby way? Obviously, I can't use Array.include? but something like that would be nice. Rob -- Posted via http://www.ruby-forum.com/.