Use idiomatic Ruby in for_all method