I have the following array
a = []
When I call a.empty? It will return true. But I want the same result in Numeric that is 1(In ruby 1 means true and 0 means false).
I know one scenario by using ternary operator
a.empty? ? 1 : 0
I want the same result without using any operators or if else conditions.