I want to test whether a equals 1 or 2
a
I could do
a == 1 || a == 2
but this requires repeating
You can just use intersection like
([a] & [1,2]).present?
a alternative way.