@@ -262,7 +262,7 @@ def filter_and_cleanup(catalog_resources)
262262 # Process each attribute in the resource
263263 resource . each do |k , v |
264264 # Title was pre-processed
265- next if k == 'title' || k == 'type'
265+ next if [ 'title' , 'type' ] . include? k
266266
267267 # Handle parameters
268268 if k == 'parameters'
@@ -272,7 +272,7 @@ def filter_and_cleanup(catalog_resources)
272272 # The order of tags is unimportant. Sort this array to avoid false diffs if order changes.
273273 # Also if tags is empty, don't add.
274274 hsh [ k ] = v . sort if v . is_a? ( Array ) && v . any?
275- elsif k == 'file' || k == 'line'
275+ elsif [ 'file' , 'line' ] . include? k
276276 # We don't care, for the purposes of catalog-diff, from which manifest and line this resource originated.
277277 # However, we may report this to the user, so we will keep it in here for now.
278278 hsh [ k ] = v
@@ -354,7 +354,7 @@ def attr_match_rule?(rule, attrib, old_val, new_val)
354354 elsif operator == '=->'
355355 # String equality test only of the old value
356356 matcher = -> ( x , _y ) { x == value }
357- elsif operator == '=~>' || operator == '=&>'
357+ elsif [ '=~>' , '=&>' ] . include? operator
358358 begin
359359 my_regex = Regexp . new ( value , Regexp ::IGNORECASE )
360360 rescue RegexpError => exc
0 commit comments