[De Morgan's](http://www.ee.surrey.ac.uk/Projects/Labview/boolalgebra/#demorganstheorem) law is your friend :)

This would be `!(enum_values.has_key?(value) || enum_values.has_value?(value))` but I actually prefer the version you have now anyway - much easy to read and hurts my brain less.