using Ruby 2.0
if
array_a = [360,370,360,350,360,360,360]
output : array_a = [360,370,360,350,360,360,360]
if
array_a = [360,360,360,360]
output : array_a = [360]
If all elements are same then only unique array should come, else same array.
I am trying to implement this logic but not able any hint please ?