Simplify .all_one? by making use of ternary operation