Comment faire une recherche dans un tableau de hachages par les valeurs de hachage en ruby?

J'ai un tableau de hachages, @pères.

a_father = { "father" => "Bob", "age" =>  40 }
@fathers << a_father
a_father = { "father" => "David", "age" =>  32 }
@fathers << a_father
a_father = { "father" => "Batman", "age" =>  50 }
@fathers << a_father 

Comment puis-je rechercher ce tableau et retourne un tableau de hachages pour qui un bloc renvoie vrai?

Par exemple:

@fathers.some_method("age" > 35) #=> array containing the hashes of bob and batman

Grâce.

InformationsquelleAutor doctororange | 2010-02-11