J'ai un tableau de hachages, @fathers.
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 retourner un tableau de hachages pour lequel un bloc renvoie true?
Par exemple:
@fathers.some_method("age" > 35) #=> array containing the hashes of bob and batman
Merci.