Pattern: Use of !collection.include?(obj)
instead of collection.exclude?(obj)
Issue: -
This rule enforces the use of collection.exclude?(obj)
over !collection.include?(obj)
.
# bad
!array.include?(2)
!hash.include?(:key)
# good
array.exclude?(2)
hash.exclude?(:key)