@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
この配列を検索して、ブロックがtrueを返すハッシュの配列を返すにはどうすればよいですか?
例えば:
@fathers.some_method("age" > 35) #=> array containing the hashes of bob and batman
ありがとう。