You are basically looking for **any** partition on **any** disk with specific encryption type.
So this can be easily done using `any?` methods, see http://ruby-doc.org/core-2.0.0/Enumerable.html#method-i-any-3F

Proposed code (**not tested**):

```ruby
need_cryptoloop = targetMap.values.any?{|e| e.fetch("partitions", []).any?{ |p| p["noauto"] == true &&  p["enc_type"] == :twofish}}
need_fish2 = targetMap.values.any?{|e| e.fetch("partitions", []).any?{ |p| p["noauto"] == true && (p["enc_type"] == :twofish_old || p["enc_type"] == :twofish_256_old)}}
```

The disadvantage is that this needs two iterations over the partitions (for each flag separately), but should be OK, you usually don't have thousands of partitions (unless you are on S390 :wink: )

BTW see also the other nice methods in Enumerable like `all?`, `none?`...