Here is how I am trying to do with array

states = ['open', 'analyzed', 'feedback', 'closed']

 unless ( ( states.grep('closed').empty? ||	states.grep
('feedback').empty? ) \
       &&  (states.grep('open').empty? ||states.grep
('analyzed').empty? ) )
      	  puts "hello"
   end

Thanks