similar_routes.all?(&:undefined_route?) equal similar_routes.all? { |r| r.undefined_route? }

also
similar_routes is an array of hashes